WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: tiny core docuwiki offline? aka local documentation for offline use 2.0  (Read 10429 times)

Offline mocore

  • Hero Member
  • *****
  • Posts: 632
  • ~.~

After some sporadic thought and a little searching ...

&& following on from this interesting discussion posted @
http://forum.tinycorelinux.net/index.php/topic,12080.msg64405.html - downloadable documentation for offline use.


The tiny core wiki appears to run on dokuwiki ..

Is the "Remote API" https://www.dokuwiki.org/devel:xmlrpc available in the wiki.tinycorelinux instance?

hear : https://www.dokuwiki.org/tips:offline-dokuwiki.sh is a 'script to export the content of your dokuwiki documentation into a offline browseable documentation'

and hear : https://github.com/MoonCactus/offline-dokuwiki is an more recently updated version

Quote from: dokuwiki.org/tips:offline-dokuwiki.sh
The cons:

    uses the external plugin indexmenu to generate a fullindex - not mandatory if you already have a full index somewhere -

    export may be incomplete if there is no page with a full index of the different pages and if you(as a user) don't have any way to make one

    no way to export only part of the wiki - there are other tools to do just that

Can the offline-dokuwiki.sh work with the wiki.tinycorelinux ?
..i think this boils down to
0) does the wiki "already have a `full index` somewhere"??
or
1) does the wiki "use the indexmenu plugin to generate `a fullindex`"??


a more clear imho question from the original offline docs post
Is there a way to wget a clean image for offline use?



Offline mocore

  • Hero Member
  • *****
  • Posts: 632
  • ~.~
Re: tiny core docuwiki offline? aka local documentation for offline use 2.0
« Reply #1 on: August 23, 2019, 07:59:03 AM »
 ::) ???
Code: [Select]
links -html-numbered-links 1 -dump "http://wiki.tinycorelinux.net/welcome?idx=wiki*"lynx -dump" should also work

this should list most if not all of the pages !

Offline mocore

  • Hero Member
  • *****
  • Posts: 632
  • ~.~
 ::)
*[trumpets]*
https://www.youtube.com/watch?v=m3dZl3yfGpc

 https://forum.tinycorelinux.net/index.php/topic,25066.msg159725.html#msg159725 # Re: Tinycore - Wiki: is Dokuwiki sources with custom patches and settings available?

wiki (plain text xD ) backup url : http://tinycorelinux.net/wiki_backup_20190610.txz
Code: [Select]

wiki_data_url=http://tinycorelinux.net/wiki_backup_20190610.txz

wiki_data="/media/mint/tcwww/tc-wiki/"$(basename  $wiki_data_url);

[ -f $wiki_data ] || echo wget $wiki_data_url;

wb_lst() { tar -t -Jf  $wiki_data ; }

 [ -z $wb_files ] && { wb_files="$(wb_lst)"; }

wb_get_file() {  tar x -O -Jf  "$wiki_data"  "$1" ; }

#...

 wb_data_dir="wiki.tinycorelinux.net/data"

 wb_page_files_index="$wb_data_dir/index/page.idx"  ;
 wb_page_title_index="$wb_data_dir/index/title.idx";


 [ -z "$wb_pages_lst"  ] && wb_pages_lst=$(  wb_get_file $wb_page_files_index );
 [ -z "$wb_titles_lst" ] && wb_titles_lst=$( wb_get_file $wb_page_title_index );

   paste -d $'\t'  /dev/fd/3 3<<-EOF /dev/fd/4 4<<-EOF
$wb_pages_lst
EOF
$wb_titles_lst
EOF


« Last Edit: March 20, 2023, 05:43:20 AM by mocore »

Offline nick65go

  • Hero Member
  • *****
  • Posts: 831
wiki (plain text xD ) backup url : http://tinycorelinux.net/wiki_backup_20190610.txz
I like the trumpets, and the last comment from the video.
Regarding the wiki, 43.1 MB compressed !?  is a little more than I expected for PLAIN TEXT.

Offline nick65go

  • Hero Member
  • *****
  • Posts: 831
Sorry. I think I got it, it is NOT only pure-text, as I saw other file types inside;
ex: 16+ MB of 93 PNG files, just in  \wiki_backup_20190610.txz\wiki_backup_20190610.tar\wiki.tinycorelinux.net\data\media\wiki\;

- or many versions of the "same" thing, like: 48 versions of "basic_desktop_installation.*.txt.gz";
\wiki_backup_20190610.txz\wiki_backup_20190610.tar\wiki.tinycorelinux.net\data\attic\dcore\
there are many like this repetitions, all over inside.

- plus compressing in a compressing will not lower the final size.

EDIT: wow. I got even a full functional "microcore.tar.gz" of 6 MB.
\wiki_backup_20190610.txz\wiki_backup_20190610.tar\wiki.tinycorelinux.net\data\media\wiki\user\

FYI: It is not criticism, I just justify myself about my initial assumptions.
« Last Edit: March 20, 2023, 10:31:39 AM by nick65go »

Offline mocore

  • Hero Member
  • *****
  • Posts: 632
  • ~.~
Sorry. I think I got it, it is NOT only pure-text, as I saw other file types inside;
very much not only
..
wiki_backup_20190610.txz / attic 20mb
wiki_backup_20190610.txz / media 30mb

not shore if this reflects the evolution of docuwiki + config settings or of  backup scripts or both

though it dose add the exciting possibility of creating some kind of wiki history diff function !!  ;D

EDIT: wow. I got even a full functional "microcore.tar.gz" of 6 MB.
\wiki_backup_20190610.txz\wiki_backup_20190610.tar\wiki.tinycorelinux.net\data\media\wiki\user\
interesting!

..after an attempt at replacing internal link text with *something else*
Code: [Select]
# tar -O -xf ./wiki_backup_20190610.txz wiki.tinycorelinux.net/data/pages/welcome.txt |  \
awk -F"\\\[\\\[" '{if(NF == 2 && index($0,"://") == 0){ split($2,l,"|") ;print  $1"[[http://localhost/wiki.cgi?url="l[1]"#|"l[2]}else{print} }'

currently mulling the possibilitys of lynx-cgi , or `real` httpd , shell2http perhaps or awk + netcat/nc 
or some kind of repl like navigation , perhaps taking some inspiration from usr/bin/tce  ???