SlideShare ist ein Scribd-Unternehmen logo
1 von 57
Office Basic
Source Code
Management
imacat
imacat@mail.imacat.idv.tw
2017/2/4, 2017/8/5
“Office Basic Source Code Management” is created by imacat (Yang Shih-Ching),
and licensed under a Creative Commons Attribution 3.0 Unported License
imacat / Yang Shih-Ching
● Taiwan OpenOffice/LibreOffice community
● Apache OpenOffice PMC
● Women in FOSS in Taiwan
OpenOffice Basic is cool!
It connects programming
with everybody’s daily routines.
I create Basic toolkit applications
for all kinds of jobs.
For example,
Accounting Sheet
Meet-up Sign Book
Mosaic Spreadsheet
Geometrical Paintings
Piano
Christmas Tree
Pokémon GO IV Calculator
But still,
OpenOffice Basic sucks!
I lost all my Basic macros
when I reinstall my system,
if I forget to export them.
I cannot synchronizing my Basic macros
among my office PC, my home PC,
and my laptop
unless I keep export and import
everything, everyday.
Finally, Basic IDE sucks.
And the macros are exported XML files,
which I cannot work with directly.
This means I cannot do complicated things
that Basic IDE does not support.
Things like…
…regular expression search and replace,
/w+@w+(.w+)+/
/w+@w+(.w+)+/
/w+@w+(.w+)+/
/w+@w+(.w+)+/
…looking into all the occurrence of something
for code refactoring,
grep -r "getNumUsers" *.*
grep -r "getNumUsers" *.*
grep -r "getNumUsers" *.*
grep -r "getNumUsers" *.*
…and many, many more.
So, I wonder:
Can I write Basic macros
outside of Basic IDE?
What do I need
if I want to write Basic macros
outside of Basic IDE?
I can keep a source directory.
Whenever I update my macro sources,
I copy-and-paste them into Basic IDE.
But this doesn’t make things easier.
Or I can create a tool to do this.
Whenever I update my macro sources,
it copy-and-pastes them into Basic IDE.
To do this,
I need to be able
to read and update the Basic macros.
This reminds me of
something similar I’d done before.
Calc Mosaic
http://sf.net/p/calcmosaic
In Calc Mosaic,
after all the mosaic sheets are created,
Basic macros are inserted to play these sheets.
Document Basic Macro Storage
● The document Basic macro storage is the
BasicLibraries attribute of the
OfficeDocument object.
OfficeDocumentOfficeDocument
BasicLibrariesBasicLibraries
Basic LibraryBasic Library
Basic Module (String)Basic Module (String)
doc_libs = doc.getPropertyValue("BasicLibraries")
System and User
Basic Macro Storage
● But the system and user Basic macros are
stored together at a different location, the
ApplicationScriptLibraryContainer service.
ApplicationApplication
ApplicationScriptLibraryContainerApplicationScriptLibraryContainer
Basic LibraryBasic Library
Basic Module (String)Basic Module (String)
app_libs = service_manager.createInstance(
"com.sun.star.script.ApplicationScriptLibraryContainer")
Basic Library Storage
● ApplicationScriptLibraryContainer has the
XNameAccess interface.
– Use hasByName() to check if a library exist.
– Use getByName() to obtain a library.
ApplicationApplication
Basic LibraryBasic Library
Basic Module (String)Basic Module (String)
ApplicationScriptLibraryContainerApplicationScriptLibraryContainer
Basic Library
● The Basic library is an XNameContainer.
– Use getByName() to obtain a module.
– Use replaceByName() to update a module.
– Use insertByName() to add a module.
– Use removeByName() to delete a module.
ApplicationApplication
ApplicationScriptLibraryContainerApplicationScriptLibraryContainer
Basic Module (String)Basic Module (String)
Basic LibraryBasic Library
Basic Module
● The Basic module obtained with the previous
getByName() is a String that contains one or
more Basic subroutines as Basic macros.
ApplicationApplication
ApplicationScriptLibraryContainerApplicationScriptLibraryContainer
Basic LibraryBasic Library
Basic Module (String)Basic Module (String)
The logic is simple.
Synchronize Between
Files and Basic Storage
Update Basic Modules
(Upload / Check In)
● Add the missing Basic modules.
● Replace the updated Basic modules.
● Delete the obsoleted Basic modules.
Update Source Files
(Download / Check Out)
● Add the missing source files.
● Replace the updated source files.
● Delete the obsoleted source files.
(obasync Demonstration)
So,
what’s so good
to leave Basic IDE?
Developers can store the source files
with cloud sync servicescloud sync services,
and access their source files EVERYWHERE!
Developers can apply version control systemversion control system
to manage their source files.
CVSCVS
Developers can host their projectshost their projects
on common project hosting services.
Developers can apply build toolsbuild tools
to automate extension packaging,
unit tests, and releases.
makemake
In addition, with the build tools,
we can establish
project layout rulesproject layout rules and templatestemplates
to simplify and automate project management.
makemake
Take my Pokémon GO IV Calculator
for example.
Pokémon GO IV Calculator
● It is entirely in my folder.
– I work seamlessly on my PC and my laptop.
Pokémon GO IV Calculator
● It is entirely in my folder.
– I work seamlessly on my PC and my laptop.
– I do not worry if my hard disk dies.
Pokémon GO IV Calculator
● It is entirely in my folder.
– I work seamlessly on my PC and my laptop.
– I do not worry if my hard disk dies.
● I use for version control.
Pokémon GO IV Calculator
● It is entirely in my folder.
– I work seamlessly on my PC and my laptop.
– I do not worry if my hard disk dies.
● I use for version control.
● I host my project on .
Pokémon GO IV Calculator
● It is entirely in my folder.
– I work seamlessly on my PC and my laptop.
– I do not worry if my hard disk dies.
● I use for version control.
● I host my project on .
● I use with a build.xml and a
fixed project template to build and release.
Pokémon GO IV Calculator
Project Structure
rootroot PokemonGoIVPokemonGoIV
oxtoxt META-INFMETA-INF
PokemonGoIVPokemonGoIV
pkg-descpkg-desc
Main.vb, …etc.
Addons.xcu
description.xml
build.xml
README
VERSION
Main.vb, …etc.manifest.xml
pkg-description.txt
Main.xba, …etc.
Try obasync!
PyPI: pypi.python.org/pypi/obasync
GitHub: github.com/imacat/obasync
For an example project using obasync,
check the Office Pokémon GO IV Calculator
on GitHub: github.com/imacat/pokemongoiv
Thank you.
Any questions?

Weitere ähnliche Inhalte

Andere mochten auch

Resource ordering and mgmt presentation
Resource ordering and mgmt presentationResource ordering and mgmt presentation
Resource ordering and mgmt presentationBrandon Williams
 
Kaila presentation
Kaila presentationKaila presentation
Kaila presentationifcaonline
 
NEPBiS Presentation 2015 - DATA -FINAL
NEPBiS Presentation 2015 - DATA -FINALNEPBiS Presentation 2015 - DATA -FINAL
NEPBiS Presentation 2015 - DATA -FINALjimmyandshadow
 
Atcore Connect - SugarCRM Call Logging by the Numbers
Atcore Connect - SugarCRM Call Logging by the NumbersAtcore Connect - SugarCRM Call Logging by the Numbers
Atcore Connect - SugarCRM Call Logging by the NumbersAtcore Systems
 
LOphoto dic2010
LOphoto dic2010LOphoto dic2010
LOphoto dic2010LOphoto
 
Real World Social CRM use cases
Real World Social CRM use casesReal World Social CRM use cases
Real World Social CRM use casesAtcore Systems
 

Andere mochten auch (20)

Peter Vang Petersen, Danefæ 2012
Peter Vang Petersen, Danefæ 2012Peter Vang Petersen, Danefæ 2012
Peter Vang Petersen, Danefæ 2012
 
Resource ordering and mgmt presentation
Resource ordering and mgmt presentationResource ordering and mgmt presentation
Resource ordering and mgmt presentation
 
9 malene beck_munkebo bakke
9 malene beck_munkebo bakke9 malene beck_munkebo bakke
9 malene beck_munkebo bakke
 
Axel Johnsen, Det er meget nemmere med kopier og private samlinger! Et nødråb...
Axel Johnsen, Det er meget nemmere med kopier og private samlinger! Et nødråb...Axel Johnsen, Det er meget nemmere med kopier og private samlinger! Et nødråb...
Axel Johnsen, Det er meget nemmere med kopier og private samlinger! Et nødråb...
 
Post og tele museum
Post og tele museumPost og tele museum
Post og tele museum
 
Kaila presentation
Kaila presentationKaila presentation
Kaila presentation
 
34 sune villumsen_f+©rromersk landsbysamfund ved k+©ge bugt
34 sune villumsen_f+©rromersk landsbysamfund ved k+©ge bugt34 sune villumsen_f+©rromersk landsbysamfund ved k+©ge bugt
34 sune villumsen_f+©rromersk landsbysamfund ved k+©ge bugt
 
16 jens chrmoesgaard_danef+ªm+©nter2016
16 jens chrmoesgaard_danef+ªm+©nter201616 jens chrmoesgaard_danef+ªm+©nter2016
16 jens chrmoesgaard_danef+ªm+©nter2016
 
Mogens Bo Henriksen, Voldtofte
Mogens Bo Henriksen, VoldtofteMogens Bo Henriksen, Voldtofte
Mogens Bo Henriksen, Voldtofte
 
lennart madsen
lennart madsenlennart madsen
lennart madsen
 
Henriette Rensbo, Nationalmuseet, Årets kirkearkæologiske undersøgelser 2012
Henriette Rensbo, Nationalmuseet, Årets kirkearkæologiske undersøgelser 2012Henriette Rensbo, Nationalmuseet, Årets kirkearkæologiske undersøgelser 2012
Henriette Rensbo, Nationalmuseet, Årets kirkearkæologiske undersøgelser 2012
 
Ulla Mannering
Ulla ManneringUlla Mannering
Ulla Mannering
 
Morten Theilmann Jørgensen - kongernes jelling og genstandene
Morten Theilmann Jørgensen - kongernes jelling og genstandeneMorten Theilmann Jørgensen - kongernes jelling og genstandene
Morten Theilmann Jørgensen - kongernes jelling og genstandene
 
Martin Egelund Poulsen, kongehøj iii langhuse og stenfyldte forsænkninger fra...
Martin Egelund Poulsen, kongehøj iii langhuse og stenfyldte forsænkninger fra...Martin Egelund Poulsen, kongehøj iii langhuse og stenfyldte forsænkninger fra...
Martin Egelund Poulsen, kongehøj iii langhuse og stenfyldte forsænkninger fra...
 
Us national universities rankings
Us national universities rankingsUs national universities rankings
Us national universities rankings
 
NEPBiS Presentation 2015 - DATA -FINAL
NEPBiS Presentation 2015 - DATA -FINALNEPBiS Presentation 2015 - DATA -FINAL
NEPBiS Presentation 2015 - DATA -FINAL
 
Atcore Connect - SugarCRM Call Logging by the Numbers
Atcore Connect - SugarCRM Call Logging by the NumbersAtcore Connect - SugarCRM Call Logging by the Numbers
Atcore Connect - SugarCRM Call Logging by the Numbers
 
LOphoto dic2010
LOphoto dic2010LOphoto dic2010
LOphoto dic2010
 
Pueblo jis2
Pueblo jis2Pueblo jis2
Pueblo jis2
 
Real World Social CRM use cases
Real World Social CRM use casesReal World Social CRM use cases
Real World Social CRM use cases
 

Mehr von imacat .

A Room of WikiWomen's Own
A Room of WikiWomen's OwnA Room of WikiWomen's Own
A Room of WikiWomen's Ownimacat .
 
Office寶可夢GO IV計算機
Office寶可夢GO IV計算機Office寶可夢GO IV計算機
Office寶可夢GO IV計算機imacat .
 
Crossing Office Applications
Crossing Office ApplicationsCrossing Office Applications
Crossing Office Applicationsimacat .
 
OpenOffice Application with Python
OpenOffice Application with PythonOpenOffice Application with Python
OpenOffice Application with Pythonimacat .
 
從doc、docx、odt到Google Docs
從doc、docx、odt到Google Docs從doc、docx、odt到Google Docs
從doc、docx、odt到Google Docsimacat .
 
More Girls – Creating a Community of Diversity
More Girls – Creating a Community of DiversityMore Girls – Creating a Community of Diversity
More Girls – Creating a Community of Diversityimacat .
 
Welcome to Apache OpenOffice 4
Welcome to Apache OpenOffice 4Welcome to Apache OpenOffice 4
Welcome to Apache OpenOffice 4imacat .
 
OpenOffice, Open Business
OpenOffice, Open BusinessOpenOffice, Open Business
OpenOffice, Open Businessimacat .
 
Multimedia Fun with OpenOffice Calc
Multimedia Fun with OpenOffice CalcMultimedia Fun with OpenOffice Calc
Multimedia Fun with OpenOffice Calcimacat .
 
Welcome to Apache OpenOffice 3.4 COSCUP 2012
Welcome to Apache OpenOffice 3.4 COSCUP 2012Welcome to Apache OpenOffice 3.4 COSCUP 2012
Welcome to Apache OpenOffice 3.4 COSCUP 2012imacat .
 
Mosaic Fun with OpenOffice Calc
Mosaic Fun with OpenOffice CalcMosaic Fun with OpenOffice Calc
Mosaic Fun with OpenOffice Calcimacat .
 
GNU Autoconf / Automake #4
GNU Autoconf / Automake #4GNU Autoconf / Automake #4
GNU Autoconf / Automake #4imacat .
 
GNU Autoconf / Automake #1
GNU Autoconf / Automake #1GNU Autoconf / Automake #1
GNU Autoconf / Automake #1imacat .
 
Solitaire with Greenfoot #3
Solitaire with Greenfoot #3Solitaire with Greenfoot #3
Solitaire with Greenfoot #3imacat .
 
Solitaire with Greenfoot #1
Solitaire with Greenfoot #1Solitaire with Greenfoot #1
Solitaire with Greenfoot #1imacat .
 
Solitaire with Greenfoot #4
Solitaire with Greenfoot #4Solitaire with Greenfoot #4
Solitaire with Greenfoot #4imacat .
 
Solitaire with Greenfoot #2
Solitaire with Greenfoot #2Solitaire with Greenfoot #2
Solitaire with Greenfoot #2imacat .
 
Solitaire with Greenfoot #2/4
Solitaire with Greenfoot #2/4Solitaire with Greenfoot #2/4
Solitaire with Greenfoot #2/4imacat .
 
Object-Oriented Programming Design with Greenfoot 02
Object-Oriented Programming Design with Greenfoot 02Object-Oriented Programming Design with Greenfoot 02
Object-Oriented Programming Design with Greenfoot 02imacat .
 
Object-Oriented Programming Design with Greenfoot 01
Object-Oriented Programming Design with Greenfoot 01Object-Oriented Programming Design with Greenfoot 01
Object-Oriented Programming Design with Greenfoot 01imacat .
 

Mehr von imacat . (20)

A Room of WikiWomen's Own
A Room of WikiWomen's OwnA Room of WikiWomen's Own
A Room of WikiWomen's Own
 
Office寶可夢GO IV計算機
Office寶可夢GO IV計算機Office寶可夢GO IV計算機
Office寶可夢GO IV計算機
 
Crossing Office Applications
Crossing Office ApplicationsCrossing Office Applications
Crossing Office Applications
 
OpenOffice Application with Python
OpenOffice Application with PythonOpenOffice Application with Python
OpenOffice Application with Python
 
從doc、docx、odt到Google Docs
從doc、docx、odt到Google Docs從doc、docx、odt到Google Docs
從doc、docx、odt到Google Docs
 
More Girls – Creating a Community of Diversity
More Girls – Creating a Community of DiversityMore Girls – Creating a Community of Diversity
More Girls – Creating a Community of Diversity
 
Welcome to Apache OpenOffice 4
Welcome to Apache OpenOffice 4Welcome to Apache OpenOffice 4
Welcome to Apache OpenOffice 4
 
OpenOffice, Open Business
OpenOffice, Open BusinessOpenOffice, Open Business
OpenOffice, Open Business
 
Multimedia Fun with OpenOffice Calc
Multimedia Fun with OpenOffice CalcMultimedia Fun with OpenOffice Calc
Multimedia Fun with OpenOffice Calc
 
Welcome to Apache OpenOffice 3.4 COSCUP 2012
Welcome to Apache OpenOffice 3.4 COSCUP 2012Welcome to Apache OpenOffice 3.4 COSCUP 2012
Welcome to Apache OpenOffice 3.4 COSCUP 2012
 
Mosaic Fun with OpenOffice Calc
Mosaic Fun with OpenOffice CalcMosaic Fun with OpenOffice Calc
Mosaic Fun with OpenOffice Calc
 
GNU Autoconf / Automake #4
GNU Autoconf / Automake #4GNU Autoconf / Automake #4
GNU Autoconf / Automake #4
 
GNU Autoconf / Automake #1
GNU Autoconf / Automake #1GNU Autoconf / Automake #1
GNU Autoconf / Automake #1
 
Solitaire with Greenfoot #3
Solitaire with Greenfoot #3Solitaire with Greenfoot #3
Solitaire with Greenfoot #3
 
Solitaire with Greenfoot #1
Solitaire with Greenfoot #1Solitaire with Greenfoot #1
Solitaire with Greenfoot #1
 
Solitaire with Greenfoot #4
Solitaire with Greenfoot #4Solitaire with Greenfoot #4
Solitaire with Greenfoot #4
 
Solitaire with Greenfoot #2
Solitaire with Greenfoot #2Solitaire with Greenfoot #2
Solitaire with Greenfoot #2
 
Solitaire with Greenfoot #2/4
Solitaire with Greenfoot #2/4Solitaire with Greenfoot #2/4
Solitaire with Greenfoot #2/4
 
Object-Oriented Programming Design with Greenfoot 02
Object-Oriented Programming Design with Greenfoot 02Object-Oriented Programming Design with Greenfoot 02
Object-Oriented Programming Design with Greenfoot 02
 
Object-Oriented Programming Design with Greenfoot 01
Object-Oriented Programming Design with Greenfoot 01Object-Oriented Programming Design with Greenfoot 01
Object-Oriented Programming Design with Greenfoot 01
 

Kürzlich hochgeladen

Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 

Kürzlich hochgeladen (20)

Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 

Office Basic Source Code Management

  • 2. “Office Basic Source Code Management” is created by imacat (Yang Shih-Ching), and licensed under a Creative Commons Attribution 3.0 Unported License
  • 3. imacat / Yang Shih-Ching ● Taiwan OpenOffice/LibreOffice community ● Apache OpenOffice PMC ● Women in FOSS in Taiwan
  • 5. It connects programming with everybody’s daily routines.
  • 6. I create Basic toolkit applications for all kinds of jobs.
  • 12. Piano
  • 14. Pokémon GO IV Calculator
  • 16. I lost all my Basic macros when I reinstall my system, if I forget to export them.
  • 17. I cannot synchronizing my Basic macros among my office PC, my home PC, and my laptop unless I keep export and import everything, everyday.
  • 19. And the macros are exported XML files, which I cannot work with directly.
  • 20. This means I cannot do complicated things that Basic IDE does not support. Things like…
  • 21. …regular expression search and replace, /w+@w+(.w+)+/ /w+@w+(.w+)+/ /w+@w+(.w+)+/ /w+@w+(.w+)+/
  • 22. …looking into all the occurrence of something for code refactoring, grep -r "getNumUsers" *.* grep -r "getNumUsers" *.* grep -r "getNumUsers" *.* grep -r "getNumUsers" *.*
  • 24. So, I wonder: Can I write Basic macros outside of Basic IDE?
  • 25. What do I need if I want to write Basic macros outside of Basic IDE?
  • 26. I can keep a source directory. Whenever I update my macro sources, I copy-and-paste them into Basic IDE.
  • 27. But this doesn’t make things easier.
  • 28. Or I can create a tool to do this. Whenever I update my macro sources, it copy-and-pastes them into Basic IDE.
  • 29. To do this, I need to be able to read and update the Basic macros.
  • 30. This reminds me of something similar I’d done before.
  • 32. In Calc Mosaic, after all the mosaic sheets are created, Basic macros are inserted to play these sheets.
  • 33. Document Basic Macro Storage ● The document Basic macro storage is the BasicLibraries attribute of the OfficeDocument object. OfficeDocumentOfficeDocument BasicLibrariesBasicLibraries Basic LibraryBasic Library Basic Module (String)Basic Module (String) doc_libs = doc.getPropertyValue("BasicLibraries")
  • 34. System and User Basic Macro Storage ● But the system and user Basic macros are stored together at a different location, the ApplicationScriptLibraryContainer service. ApplicationApplication ApplicationScriptLibraryContainerApplicationScriptLibraryContainer Basic LibraryBasic Library Basic Module (String)Basic Module (String) app_libs = service_manager.createInstance( "com.sun.star.script.ApplicationScriptLibraryContainer")
  • 35. Basic Library Storage ● ApplicationScriptLibraryContainer has the XNameAccess interface. – Use hasByName() to check if a library exist. – Use getByName() to obtain a library. ApplicationApplication Basic LibraryBasic Library Basic Module (String)Basic Module (String) ApplicationScriptLibraryContainerApplicationScriptLibraryContainer
  • 36. Basic Library ● The Basic library is an XNameContainer. – Use getByName() to obtain a module. – Use replaceByName() to update a module. – Use insertByName() to add a module. – Use removeByName() to delete a module. ApplicationApplication ApplicationScriptLibraryContainerApplicationScriptLibraryContainer Basic Module (String)Basic Module (String) Basic LibraryBasic Library
  • 37. Basic Module ● The Basic module obtained with the previous getByName() is a String that contains one or more Basic subroutines as Basic macros. ApplicationApplication ApplicationScriptLibraryContainerApplicationScriptLibraryContainer Basic LibraryBasic Library Basic Module (String)Basic Module (String)
  • 38. The logic is simple.
  • 40. Update Basic Modules (Upload / Check In) ● Add the missing Basic modules. ● Replace the updated Basic modules. ● Delete the obsoleted Basic modules.
  • 41. Update Source Files (Download / Check Out) ● Add the missing source files. ● Replace the updated source files. ● Delete the obsoleted source files.
  • 43. So, what’s so good to leave Basic IDE?
  • 44. Developers can store the source files with cloud sync servicescloud sync services, and access their source files EVERYWHERE!
  • 45. Developers can apply version control systemversion control system to manage their source files. CVSCVS
  • 46. Developers can host their projectshost their projects on common project hosting services.
  • 47. Developers can apply build toolsbuild tools to automate extension packaging, unit tests, and releases. makemake
  • 48. In addition, with the build tools, we can establish project layout rulesproject layout rules and templatestemplates to simplify and automate project management. makemake
  • 49. Take my Pokémon GO IV Calculator for example.
  • 50. Pokémon GO IV Calculator ● It is entirely in my folder. – I work seamlessly on my PC and my laptop.
  • 51. Pokémon GO IV Calculator ● It is entirely in my folder. – I work seamlessly on my PC and my laptop. – I do not worry if my hard disk dies.
  • 52. Pokémon GO IV Calculator ● It is entirely in my folder. – I work seamlessly on my PC and my laptop. – I do not worry if my hard disk dies. ● I use for version control.
  • 53. Pokémon GO IV Calculator ● It is entirely in my folder. – I work seamlessly on my PC and my laptop. – I do not worry if my hard disk dies. ● I use for version control. ● I host my project on .
  • 54. Pokémon GO IV Calculator ● It is entirely in my folder. – I work seamlessly on my PC and my laptop. – I do not worry if my hard disk dies. ● I use for version control. ● I host my project on . ● I use with a build.xml and a fixed project template to build and release.
  • 55. Pokémon GO IV Calculator Project Structure rootroot PokemonGoIVPokemonGoIV oxtoxt META-INFMETA-INF PokemonGoIVPokemonGoIV pkg-descpkg-desc Main.vb, …etc. Addons.xcu description.xml build.xml README VERSION Main.vb, …etc.manifest.xml pkg-description.txt Main.xba, …etc.
  • 56. Try obasync! PyPI: pypi.python.org/pypi/obasync GitHub: github.com/imacat/obasync For an example project using obasync, check the Office Pokémon GO IV Calculator on GitHub: github.com/imacat/pokemongoiv