Skip to content

Conversation

@jayrm
Copy link
Member

@jayrm jayrm commented May 22, 2019

wiki updates:

  • wiki snapshot up to 2019-05-20
  • examples/manual updated
  • update doc/fbc.1 to include the -strip and -nostrip option

fbdoc updates:

  • CWikiCon now extends OBJECT to allow the derived classes CWikiConUrl, CWikiConDir, CWikiConSql
  • getindex & getpage tools are updated to use CWikiCon* objects. getindex probably shows best, though there is still some messy / duplicated code there.
  • added several database related options to connect directly to a database. Usage of MySQL library is wrapped in HAVE_MYSQL conditional compilation, as it is likely only interesting to me at the moment. In future, most of these conditionals should get centralized in CWikiConSql, which will simply provide a default (always fail) interface when HAVE_MYSQL is not defined. i.e. allow compilation but not require linking with the mysql library.

One of the goals of fbdoc (aside from generating the manual) from the beginning has been to use the features available in the compiler. Haven't done that in a while. So, I started with CWikiCon as it is one of the simpler interfaces to work with.

  • CWikiCon is the base class, extends object, abstracting a "connection" object to a wiki.
  • CWikiConUrl represents connection to web (http) server
  • CWikiConDir represents connection to directory (files), and eventually this will probably be base for CWikiCache
  • CWikiConSql represents connection to database (MySQL) server

Once the connection is established, sometimes with specialized methods for each class, the intent is that only the common methods are then needed, accessed through the base class

  • LoadIndex() gets an index of page names
  • LoadPage() loads a page from the connection in to memory
  • StorePage() stores a page from memory to the connection
  • StoreNewPage() stores a new page from memory to the connection
  • GetPageID() get the page identifier for the last loaded page

The MySQL inclusion likely doesn't have much practical use for on line wiki. Mostly I added it just to check that the raw data I can fetch from the database is exactly the same data I can fetch from the web server.

@jayrm jayrm merged commit 4b43cc9 into freebasic:master Jun 1, 2019
@jayrm jayrm deleted the fbdoc branch June 1, 2019 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant