Re: [Zim-wiki] Export to hml with images

2021-06-29 Thread Marko Mahnič

  
  
On 29. 06. 2021 20:20, John R. Marks,
  IV wrote:


  The next thing I'll be working on is getting it to generate an RSS feed, but I think this whole deal begs the question -- could this functionality be replicated on export, or in some other way internal to zim and is there interest? I've looked at the templating system, but I'm not seeing exactly how to do what I'm thinking about, especially the image stuff. I'm guessing there might be a plugin way to do it as well, but I'm not (yet) familiar with enough python and was curious if anyone else liked this idea? I'll be pushing forward with it regardless.



There is a plugin way: I've created a Zim plugin that generates
  sites using pandoc. It was developed for 0.68 but I haven't
  updated it since, so it probably doesn't work with the latest
  version. You can check the documentation for the plugin that was
  generated with the plugin: https://mmahnic.github.io/zim-siteexporter-doc/index.html
  .  The news system was supposed to be used as a blog https://mmahnic.github.io/zim-siteexporter-doc/page-type/news.html
  .

The code for the plugin is here: https://github.com/mmahnic/zim-plugin-siteexporter
Marko

  


___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export to hml with images

2021-06-29 Thread Agustin Lobo
By some reason, cannot export MHTML: once I select the output file,
click OK and nothing happens.
Print to Browser does not work either.
Using 0.73.5 on linux

Agustin Lobo
aloboa...@gmail.com

On Tue, Jun 29, 2021 at 10:34 AM Jaap Karssenberg
 wrote:
>
> No. Html does not (really) allow for embedding the images into the html, they 
> are typically exported as separate files. Maybe you can use the MHTML (Web 
> archive) export format ?  It is not as widely supported, but it does allow 
> creating a single file.
>
> -- Jaap
>
> On Mon, Jun 28, 2021 at 8:05 PM Agustin Lobo  wrote:
>>
>> Is it possible to export to html so that the images get included
>> within the html file itself?
>> Thanks
>>
>> Agustin Lobo
>> aloboa...@gmail.com
>>
>> ___
>> Mailing list: https://launchpad.net/~zim-wiki
>> Post to : zim-wiki@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~zim-wiki
>> More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export to hml with images

2021-06-29 Thread John R. Marks, IV
Speaking of; a big picture thing I've been hacking together, and I wonder if 
there's any interest and/or easy way to accomplish.  

Basically, zim as a simple blogging platform; I'm doing a bit of it now because 
I wanted something simpler than Wordpress.

Current procedure for me is to use the Journal as the jump-off point; I get 
dates and can do an "overview" that way, so any page under a date is 
"recognized" by my system as an entry.

Right now, all my "system" entails is a few bash scripts that edit the exported 
html before it's pushed to my server; the changes being "addition of metadata 
for the social media platforms," specifically
- Adds "title" metadata from the title
- Adds "subtitle" metadata from the first italicized line after the title
- Adds "image" metadata" from the first image it encounters.

Mine does both Open Graph (facebook/linkedin) and Twitter cards, so when you 
share the page, you get the "preview" deal that you see all over, I can share 
to github or similar if interested (FYI note that you may have to "upload" the 
page to facebook/twitter BEFORE you share it to get it to show up, it's a 
developer thing) 

Here's an example page, you can view the source to see what else it produces. 
(please ignore the opinion if its not your deal :) )
https://jrm4.com/Journal/2021/06/16/Why_Cryptocurrency_is_Here_to_Stay.html


The next thing I'll be working on is getting it to generate an RSS feed, but I 
think this whole deal begs the question -- could this functionality be 
replicated on export, or in some other way internal to zim and is there 
interest? I've looked at the templating system, but I'm not seeing exactly how 
to do what I'm thinking about, especially the image stuff. I'm guessing there 
might be a plugin way to do it as well, but I'm not (yet) familiar with enough 
python and was curious if anyone else liked this idea? I'll be pushing forward 
with it regardless.

John


On Tue, Jun 29, 2021 at 10:34:24AM +0200, Jaap Karssenberg wrote:
> No. Html does not (really) allow for embedding the images into the html,
> they are typically exported as separate files. Maybe you can use the MHTML
> (Web archive) export format ?  It is not as widely supported, but it does
> allow creating a single file.
> 
> -- Jaap
> 
> On Mon, Jun 28, 2021 at 8:05 PM Agustin Lobo  wrote:
> 
> > Is it possible to export to html so that the images get included
> > within the html file itself?
> > Thanks
> >
> > Agustin Lobo
> > aloboa...@gmail.com
> >
> > ___
> > Mailing list: https://launchpad.net/~zim-wiki
> > Post to : zim-wiki@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~zim-wiki
> > More help   : https://help.launchpad.net/ListHelp
> >

> ___
> Mailing list: https://launchpad.net/~zim-wiki
> Post to : zim-wiki@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~zim-wiki
> More help   : https://help.launchpad.net/ListHelp


___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Making indexing optional ?

2021-06-29 Thread Mario Bezzi

Hi Jaap, thank you for all your help on this.

I just tested the development branch which seems to include your 
mentioned fix. Sadly zim startup took approximately the same time as 
before.
Maybe my use case is abnormal? If so I don't want you to spend lots of 
time on this.


Below the output of ./zim.py -V -D. All the time is spent in 
BackgroundCheck. Is this what you would expect? May we (I?) add debug 
messages to track the time spent indexing large files?


Thank you,
mario

-

mario_bezzi@XPS-15-9560:~/Downloads/zim-desktop-wiki-develop$ ./zim.py -V -D
DEBUG: Loading config from: /home/mario_bezzi/.config/zim/preferences.conf>
DEBUG: New extendable: 0x7f99b7a5eaf0>

DEBUG: Loading plugin: pageindex
DEBUG: Loading plugin: pathbar
DEBUG: Loading plugin: insertsymbol
DEBUG: Loading plugin: printtobrowser
DEBUG: Loading plugin: versioncontrol
DEBUG: Loading plugin: attachmentbrowser
DEBUG: Loading plugin: bookmarksbar
DEBUG: Loading plugin: journal
INFO: This is zim 0.73.5
DEBUG: Python version is sys.version_info(major=3, minor=8, micro=5, 
releaselevel='final', serial=0)

DEBUG: Platform is posix
DEBUG: Running from a source dir: 
/home/mario_bezzi/Downloads/zim-desktop-wiki-develop

DEBUG: Set XDG_DATA_HOME to /home/mario_bezzi/.local/share
DEBUG: Set XDG_DATA_DIRS to [, /usr/local/share>, , ]

DEBUG: Set XDG_CONFIG_HOME to /home/mario_bezzi/.config
DEBUG: Set XDG_CONFIG_DIRS to [, ]
DEBUG: Set XDG_CACHE_HOME to /home/mario_bezzi/.cache
DEBUG: Connecting to /run/user/1000/zim-0.73.5-43e7ec27
DEBUG: Got error in dispatch: No such file or directory
DEBUG: Starting primary process
DEBUG: Start listening on: /run/user/1000/zim-0.73.5-43e7ec27
DEBUG: Loading config from: 0x7f99b5719040>
DEBUG: Loading config from: 
/home/mario_bezzi/Dropbox/Documents/Wikis/notebook.zim
DEBUG: Loading config from: 
/home/mario_bezzi/Dropbox/Documents/Wikis/notebook.zim
DEBUG: Loading config from: 
/home/mario_bezzi/.cache/zim/notebook-home_mario_bezzi_Dropbox_Documents_Wikis/state.conf

DEBUG: New extendable: 
DEBUG: Load extension: 'zim.plugins.journal.JournalNotebookExtension'>
DEBUG: Load extension: 'zim.plugins.versioncontrol.VersionControlNotebookExtension'>

INFO: No VCS detected
DEBUG: Loading config from: /home/mario_bezzi/.config/zim/style.conf>

DEBUG: Autosave interval: 15 - use threads: True
DEBUG: Loading config from: /home/mario_bezzi/.config/zim/customtools/command shell-usercreated.desktop>

INFO: Page changed on disk: Home:ZABEXPRF:ZX Manuals
INFO: Open page: Home:ZABEXPRF:ZX Manuals (Home:ZABEXPRF:ZX Manuals)
DEBUG: New extendable: 0x7f99b56bee00 (zim+gui+notebookview+NotebookView at 0x160)>
DEBUG: Load extension: 'zim.plugins.attachmentbrowser.AttachmentBrowserWindowExtension'>

DEBUG: Action: toggle_panes(False)
DEBUG: Action: toggle_panes(True)
DEBUG: Load extension: 'zim.plugins.insertsymbol.InsertSymbolPageViewExtension'>
DEBUG: Load extension: 'zim.plugins.journal.JournalNotebookViewExtension'>
DEBUG: Load extension: 'zim.plugins.pageindex.PageIndexNotebookViewExtension'>
DEBUG: Load extension: 'zim.plugins.printtobrowser.PrintToBrowserPageViewExtension'>
DEBUG: New extendable: (zim+gui+mainwindow+MainWindow at 0x1b9a270)>
DEBUG: Load extension: 'zim.plugins.bookmarksbar.BookmarksBarMainWindowExtension'>
DEBUG: Load extension: 'zim.plugins.pathbar.PathBarMainWindowExtension'>
DEBUG: Load extension: 'zim.plugins.versioncontrol.VersionControlMainWindowExtension'>

DEBUG: Accelmap: /home/mario_bezzi/.config/zim/accelmap
DEBUG: Add window: MainWindow
DEBUG: BackgroundCheck started
DEBUG: BackgroundCheck finished



On 6/26/21 7:55 PM, Jaap Karssenberg wrote:

Hi Mario,

Just pushed a fix (29bdea) that improves how we check whether files 
are a zim page or not. Now max 50 characters are being read at the 
start of the file when indexing. If your large files are not "line 
based" (thus resulting in a very long read when trying to read the 
first line) this should fix the issue.


Regards,

Jaap


On Sat, Apr 24, 2021 at 10:06 AM Mario Bezzi 
> wrote:


Hi Jaap, thank you for your help on this.

To give you some more details: Of the 3000+ files which size sums
up to 2GB, the top 500 account for 1.6GB. Among these the average
size is 3.5MB, and each of the top three is in the 250MB range.

Please let me know if there is anything I can do to help testing
your fix,
mario

On 4/23/21 2:55 PM, Jaap Karssenberg wrote:

Hi Mario,

That is not the result I hoped for :(   I will need to generate
some random large text files to test & debug on my end.

Regards,

Jaap


On Fri, Apr 23, 2021 at 12:59 PM Mario Bezzi
mailto:subscriptions.mario.be...@gmail.com>> wrote:

I think I submitted my request circa 2014 under the previous
bug tracking system - was it hosted by Ubuntu-one? - but yes,
the idea is similar.

I just downloaded the development version, 

Re: [Zim-wiki] Export to hml with images

2021-06-29 Thread Jaap Karssenberg
No. Html does not (really) allow for embedding the images into the html,
they are typically exported as separate files. Maybe you can use the MHTML
(Web archive) export format ?  It is not as widely supported, but it does
allow creating a single file.

-- Jaap

On Mon, Jun 28, 2021 at 8:05 PM Agustin Lobo  wrote:

> Is it possible to export to html so that the images get included
> within the html file itself?
> Thanks
>
> Agustin Lobo
> aloboa...@gmail.com
>
> ___
> Mailing list: https://launchpad.net/~zim-wiki
> Post to : zim-wiki@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~zim-wiki
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp