Skip to main content

Home/ Sensorica Knowledge/ Group items matching "editor" in title, tags, annotations or url

Group items matching
in title, tags, annotations or url

Sort By: Relevance | Date Filter: All | Bookmarks | Topics Simple Middle
Tiberius Brastaviceanu

Google Apps Script - introduction - 0 views

  • Use the Script Editor to write and run scripts, to set triggers, and to perform other actions such as sharing scripts.
  • start the Script Editor from a Google Site
  • declares a function called myFunction()
  • ...69 more annotations...
  • You can perform the following tasks from the Script Editor.
  • pening, deleting, renaming, and saving scripts
  • Cutting, copying, and pasting text
  • Find and replace
  • Setting a time zone
  • scripts with time-based triggers
  • Running functions
  • Viewing log messages
  • revision history
  • write pseudocode first
  • When you're planning a script
  • narrative version of what the script needs to do.
  • A particular script is associated with one and only one Google Spreadsheet.
  • If you make a copy of the Spreadsheet, the script is also copied.
  • A particular Spreadsheet can have multiple scripts associated with it.
  • use the onOpen event handler in more than one script associated with a particular Spreadsheet, all scripts begin to execute when you open the Spreadsheet and the order in which the scripts are executed is indeterminate.
  • event handler is a function executed when a particular event takes place.
  • see Running Scripts in Response to an Event.
  • A script cannot currently call or create another script and cannot call functions in another script.
  • If you want to store the results of a function, you must copy them into a spreadsheet cell.
  • You can trigger Apps Script events from links that are embedded in a Google Site. For information about how to do this, see Using Apps Scrip in Your Ssite.
  • You can insert a script into a Site as a gadget.
  • you must grant permission for the script to run as a service.
  • You also designate whether only you can invoke the service or whether all members of your domain can invoke the service.
  • you can assign functions within the script any arbitrary name.
  • The instructions in a function must be enclosed within curly braces.
  • event handler
  • when a spreadsheet is opened,
  • when a script is installed
  • when a spreadsheet is edited
  • at times you choose
  • menu item
  • Using a drawing or button embedded in a Spreadsheet
  • Using a custom function that is referenced as a Spreadsheet function
  • Clicking the Run button
  • object-oriented programming languages
  • Google Apps Script uses the JavaScript language.
  • Operations
  • are performed using the objects and methods described in the API documentation.
  • An API provides pre-packaged code for standard tasks you need to accomplish in scripts or programs.
  • API includes objects that you use to accomplish tasks such as sending email, creating calendar entries
  • A method describes the behavior of an object and is a function attached to an object.
  • MailApp
  • use to create and send email
  • To send email, you invoke the sendEmail method and provide values for the method arguments.
  • Google Apps Script can access or retrieve data in different formats in different ways.
  • A custom function
  • is called directly from a cell in a Spreadsheet using the syntax =myFunctionName()
  • they cannot set values outside the cells
  • have some restrictions not shared by other functions
  • cannot send email
  • cannot operate on a Google Site
  • cannot perform any operations that require user authorization
  • cannot perform any operations that require knowledge of who the user
  • onInstall function
  • onOpen function
  • Other functions run when you run them manually or when they are triggered by clicking
  • Custom functions and formulas in the spreadsheet execute any time the entire Spreadsheet is evaluated or when the data changes in the function or formula's cell.
  • share the Spreadsheet
  • publish the script to the Script Gallery
  • spreadsheet template
  • the color coding for that line will not be correct
  • A script with incorrect syntax or other errors does not run.
  • The Script Editor includes a debugger.
  • view the current state of variables and objects created by a script while that script runs.
  • step through the code line by line as it executes or set breakpoints
  • The debugger does not work with custom functions, onEdit functions, event triggers, or scripts running as a service.
  • use the debugger to find errors in scripts that are syntactically correct but still do not function correctly.
  • Functions ending in an underscore (_), for example, internalStuff_(), are treated differently from other functions. You do not see these function in the Run field in the Script Editor and they do not appear in the Script Manager in the Spreadsheet. You can use the underscore to indicate that users should not attempt to run the function and the function is available only to other functions.
Tiberius Brastaviceanu

Google Apps Script - introduction - 0 views

  • Google Apps Script provides you with the ability to build a user interface for displaying or capturing information.
  • Viewing the Available User Interface Elements
  • Your scripts can display the user interface in two ways:
  • ...48 more annotations...
  • from a Spreadsheet
  • from a Site
  • As a stand-alone servlet
  • Deciding Whether to Run a Script from a Spreadsheet or as a Service
  • The built-in code autocomplete functionality in the editor requires you to type the trailing period that follows app.
  • Plan the script. What tasks should the script accomplish?
  • Write down the specific information you want to display to or collect from your users.
  • Draw the user interface
  • Determine what the script and interface should do in response to any user input.
  • Determine the conditions for exiting the script.
  • you need a UiApp application object to contain the user interface elements. After you create the UiApp application object, you can add buttons, dialog boxes, panels, and other elements to the UiApp application object.
  • The general syntax for these operations is as follows:
  • To create a UiApp application object, use the syntax var your_application_object_name = UiApp.createApplication();
  • To create a user interface element and associate it with your UiApp application object, use the syntax var your_ui_element_name= your_application_object_name.createElement_Name();.
  • To add one user interface element to another
  • use the syntax your_ui_element_name1.add(your_ui_element_name2);
  • a button with the text Press Me on it:
  • creates a vertical panel.
  • other kinds of panels
  • pop-up panels, stack panels, focus panels, form panels, and so on.
  • code for displaying your button on the panel:
  • add the panel to the application:
  • nstruct Google Apps Script to display the interface elements:
  • You can create the user interface elements in any order.
  • the display order
  • Creating the elements and adding them to your application are separate steps requiring separate instructions.
  • a short script that does nothing but display a panel with a button on it.
  • You can chain together setter methods
  • sets its title
  • set the size of the object:
  • how to use Grid objects and the setWidget method to create a more complex layout and also how to create text boxes and label them.
  • To make a user interface useful, you need the ability to update a Spreadsheet with information a user enters from the interface.
  • a short script that responds to an action in the interface by updating the Spreadsheet.
  • looping structure in the script to keep the panel displayed and active
  • Server-side means that the actions are performed by a server
  • same script, with functions added that enable the form to be used multiple times before a user chooses to exit.
  • script collects some information from text fields on a panel and writes that information into the Spreadsheet.
  • You can make a script's user interface available to users from inside a Spreadsheet or Site or by running it separately as a service.
  • how to make the user interface as a service.
  • A script that provides a stand-alone user interface must invoke the doGet(e) function or the doPost(e) function for an HTML form submit.
  • A script that provides the user interface from the Spreadsheet invokes doc.show(app).
  • The doGet(e) function takes the argument e, passing in the arguments for the user interface, including the user name of the person invoking the script.
  • After you write the script, you publish it as a service. During the publishing process, you define who has access to the script.
  • In a Google Apps domain, you can publish the script so that only you have access or so that everyone in the domain has access.
  • In a Google consumer account, you can publish the script so that only you have access or so that everyone in the world has access.
  • Updating a Spreadsheet from the User Interface, the user interface is displayed from the Spreadsheet where the script is stored. The following code defines how the user interface is displayed:
  • Here's the skeleton code for displaying a user interface as a stand-alone service:
  • some aspects of the two ways to display a user interface.
Tiberius Brastaviceanu

Google Apps Script - introduction - 0 views

  • script that you want to run every day at a specific time
  • script that should run after a user submits a data-collection form.
  • Google Apps Script provides simple event handlers and installable event handlers, which are easy ways for you to specify functions to run at a particular time or in response to an event.
  • ...39 more annotations...
  • let's consider the terminology we use for events
  • event triggers
  • triggers
  • in response
  • event handler
  • event
  • onInstall function
  • onOpen function.
  • onEdit function
  • the simple event handlers are restricted in what they are permitted to do:
  • The spreadsheet containing the script must be opened for editing
  • cannot determine the current user
  • cannot access any services that require authentication as that user
  • Calendar, Mail and Site are not anonymous and the simple event handlers cannot access those services.
  • can only modify the current spreadsheet. Access to other spreadsheets is forbidden.
  • see Understanding Permissions and Script Execution.
  • The onOpen function runs automatically when a user opens a spreadsheet.
  • add custom menu items to the spreadsheet's menu bar.
  • onEdit function runs automatically when any cell of the spreadsheet is edited.
  • record the last modified time in a comment on the cell that was edited.
  • The onInstall function is called when a script is installed from the Script Gallery.
  • setting up custom menus for the user.
  • the script can call onOpen from onInstall.
  • Installable event handlers are set on the Triggers menu within the Script Editor, and they're called triggers in this document.
  • When a specific time is reached
  • When a form is submitted
  • When a Spreadsheet is edited
  • When a Spreadsheet is opened.
  • They can potentially access all services available to the user who installed the handler.
  • are fully-capable scripts with none of the access limitations of simple event handlers
  • may not be able to determine which user triggered the event being handled
  • The spreadsheet containing the script does not have to be open for the event to be triggered and the script to run.
  • You can connect triggers to one or more functions in a script. Any function can have multiple triggers attached. In addition, you can add trigger attributes to a function to further refine how the trigger behaves.
  • When a script runs because of a trigger, the script runs using the identity of the person who installed the trigger, not the identity of the user whose action triggered the event. This is for security reasons.
  • Installing an event handler may prompt for authorization to access
  • An event is passed to every event handler as the argument (e). You can add attributes to the (e) argument that further define how the trigger works or that capture information about how the script was triggered.
  • an example of a function that sends email to a designated individual containing information captured by a Spreadsheet when a form is submitted.
  • With Google Apps, forms have the option to automatically record the submitter's username, and this is available to the script as e.namedValues["Username"]. Note: e.namedValues are only available for Google Apps domains and not for consumer Google accounts.
  • The available attributes for triggers are described in the following tables.
  •  
    script that you want to run every day at a specific time
Tiberius Brastaviceanu

Google Apps Script - introduction - 0 views

  • control over Google products
  • can access and control Google Spreadsheets and other products
  • scripts
  • ...44 more annotations...
  • run directly on Google servers in order to provide direct access to the products they control.
  • can also use Google Apps Script from Google Sites
  • Google Apps Script Template Gallery
  • Google Apps Script Blog
  • guide contains the information you need to use Google Apps Script, a server-side scripting language, based on JavaScript, that runs on Google's servers alongside Google Apps
  • enable varying degrees of interactivity among the applications
  • easy enough to use that you don't have to be a programmer to create scripts.
  • use it to automate complex tasks within Google Apps
  • You don't have to be a programmer to use Google Apps Script
  • A script is a series of instructions you write in a computer language to accomplish a particular task. You type in the instructions and save them as a script. The script runs only under circumstances you define.
  • The Google Apps Script API provides a set of objects. You can use these objects and their associates methods to access Google Docs and Spreadsheets, Gmail, Google Finance, and other Google applications.
  • To run a script, you must first add the script to a Google Spreadsheet or Google Site using the Script Editor.
  • You can retrieve information from a wide selection of Google Apps and Services and from external sources, including web pages and XML sources. You can use Google Apps Script to create email, spreadsheets, pages on Google Sites, and files in the Google Docs Document List.
  • The instructions in a script are grouped into functions.
  • objects
  • methods
  • for such tasks
  • Create pages on a Google Site
  • Customize a Spreadsheet
  • Send email based on information in a Spreadsheet
  • You can manipulate
  • numeric
  • financial
  • string
  • an XML document
  • controlling data in the following applications
  • Spreadsheets
  • Google Document List
  • Contacts
  • Calendar
  • Sites
  • Google Maps
  • create and display interactive user interface elements
  • interact with relational database management systems
  • create folders, subfolders, and files in the Google Docs document list
  • access to user, session, and browser information
  • access to web services
  • extract data from XML documents and then manipulate that data
  • obtain translations of text from one language to another
  • send email
  • UrlFetch services
  • encode and decode strings and format dates
  • store properties on a per-script and per-user basis
  • create, delete and update contact information for individuals and for groups in Google Contacts
Tiberius Brastaviceanu

Evolving Towards a Partner State in an Ethical Economy - 0 views

  • In the  emerging institutional model of peer production
  • we can distinguish an interplay between three partners
  • a community of contributors that create a commons of knowledge, software or design;
  • ...46 more annotations...
  • There is a clear institutional division of labour between these three players
  • a set of "for-benefit institutions' which manage the 'infrastructure of cooperation'
  • an enterpreneurial coalition that creates market value on top of that commons;
  • because democracy, and the market, and hierarchy, are modes of allocation of scarce resources
  • Is there perhaps a new model of power and democracy co-evolving out of these new social practices, that may be an answer to the contemporary crisis of democracy
  • we are witnessing a new model for the state. A 'P2P' state, if you will.
  • The post-democratic logic of community
  • these communities are not democracies
  • Can we also learn something about the politics of this new mode of value creation
  • has achieved capacities both for global coordination, and for the small group dynamics that are characteristic of human tribal forms and that it does this without 'command and control'! In fact, we can say that peer production has enabled the global scaling of small-group dynamics.
  • Everyone can contribute without permission, but such a priori permissionlessness is  matched with mechanisms for 'a posteriori'  communal validation, where those with recognized expertise and that are accepted by the community, the so-called 'maintainers' and the 'editors',  decide
  • These decisions require expertise, not communal consensus
  • tension between inclusiveness of participation and selection for excellence
  • allowing for maximum human freedom compatible with the object of cooperation. Indeed, peer production is always a 'object-oriented' cooperation, and it is the particular object that will drive the particular form chosen for its 'peer governance' mechanisms
  • The main allocation mechanism in such project, which replaces the market, the hierarchy and democracy,  is a 'distribution of tasks'
  • no longer a division of labor between 'jobs', and the mutual coordination works through what scientist call 'stigmergic signalling'
  • work environment is designed to be totally open and transparent
  • every participating individual can see what is needed, or not and decide accordingly whether to undertake his/her particular contribution
  • this new model
  • Such communities are truly poly-archies and the type of power that is held in them is meritocratic, distributed, and ad hoc.
  • And they have to be, because an undemocratic institution would also discourage contributions by the community of participants.
    • Kurt Laitner
       
      disagree, there are many ways to ethically distribute governance, not just democracy
  • Hence, an increased exodus of productive  capacities, in the form of direct use value production, outside the existing system of monetization, which only operates at its margins.
  • Where there is no tension between supply and demand, their can be no market, and no capital accumulation
  • Facebook and Google users create commercial value for their platforms, but only very indirectly and they are not at all rewarded for their own value creation.
  • Since what they are creating is not what is commodified on the market for scarce goods, there is no return of income for these value creators
  • This means that social media platforms are exposing an important fault line in our system
  • If you did not contribute, you had no say, so engagement was and is necessary.
    • Kurt Laitner
       
      key divergence from birth/process citizenship driven democracy
  • ⁃   At the core of value creation are various commons, where the innovations are deposited for all humanity to share and to build on ⁃   These commons are enabled and protected through nonprofit civic associations, with as national equivalent the Partner State, which empowers and enables that social production ⁃   Around the commons emerges a vibrant commons-oriented economy undertaken by different kinds of ethical companies, whose legal structures ties them to the values and goals of the commons communities, and not absentee and private shareholders intent of maximising profit at any cost
  • the citizens deciding on the optimal shape of their provisioning systems.
    • Kurt Laitner
       
      ie value equations..?
  • Today, it is proto-mode of production which is entirely inter-dependent with the system of capital
  • Is there any possibility to create a really autonmous model of peer production, that could create its own cycle of reproduction?
  • contribute
    • Kurt Laitner
       
      defined as?
    • Tiberius Brastaviceanu
       
      "ad hoc": perhaps based on context, needs and everyone's understanding of the situation
  • and whose mission is the support of the commons and its contributors
  • In this way, the social reproduction of commoners would no longer depend on the accumulation cycle of capital, but on its own cycle of value creation and realization
  • Phyles are mission-oriented, purpose-driven, community-supportive entities that operate in the market, on a global scale, but work for the commons.
  • peer production license, which has been proposed by Dmytri Kleiner.
  • Thijs Markus writes  so eloquently about Nike in the Rick Falkvinge blog, if you want to sell $5 shoes for $150 in the West, you better have one heck of a repressive IP regime in place.
  • Hence the need for SOPA/PIPA , ACTA'S and other attempts to criminalize the right to share.
  • An economy of scope exists between the production of two goods when two goods which share a CommonCost are produced together such that the CommonCost is reduced.
  • shared infrastructure costs
  • 2) The current system beliefs that innovations should be privatized and only available by permission or for a hefty price (the IP regime), making sharing of knowledge and culture a crime; let's call this feature, enforced 'artificial scarcity'.
  • 1) Our current system is based on the belief of infinite growth and the endless availability of resources, despite the fact that we live on a finite planet; let's call this feature, runaway 'pseudo-abundance'.
  • So what are the economies of scope of the new p2p age? They come in two flavours: 1) the mutualizing of knowledge and immaterial resources 2) the mutualizing of material productive resources
  • how does global governance look like in P2P civilization?
  • conflicts between contributors
  • are not decided by authoritarian fiat, but by 'negotiated coordination'.
1 - 8 of 8
Showing 20 items per page