Mock of Ext JS 4 documentation - extjs4

I have been researching for various type of documentation options for our products. I thought it would be cool to have Ext JS 4 Docs type of look&feel rather than Twiki.
But I am having tough time to understand the current docs page in Ext JS 4.0.7. Each and every directory has README.js & README.md. If I am not wrong, I have to create my custom documentation in README.md, but I am failing to understand how that would be converted into README.js.
Could someone let me know how to .md file can be converted into .js?

They are using a self made tool, which is called JSDuck
I guess you need to run it over your .md files and it will generate the .js files for you.

JsDuck is the way to go. I'm using it to build some custom documentation.
To get the guides:
just create a json file. I usually call it guides.json and write out the structure. It is well defined in the link below.
Create a folder in the same location as the guides file and in it:
create a folder for each entry in the json. (each entry has a name field and this should be the name of the folder)
Create the file readme.md
Add an icon to it. It should be names icon-lg.png
When using jsduck from the command line, add the following to the arguments:
--guides=[the path to your guides.json file]
More information can be found here:
https://github.com/senchalabs/jsduck/wiki/Advanced-Usage (go to the guides section)
Also, to get more information on the commandline parameters, use the command
jsduck-3.2.1 --help=full
Hope this works for you.

Related

yt-dlp : How can I have separate file format for playlists and single videos

I have an urls file where I store all links I want to download. I download from it using yt-dlp -a urls.
For playlists I'd like to put videos into a folder, like it's shown in documentation examples, while for single videos I'd like to keep the separate file format though.
How can I do it with a single configuration file? If it's not possible with a single configuration file, I'd want to have other options in a single common place.
Note: In documentation I saw TYPES: in --output, but I don't know how to use it and if it's applicable to my case.
PS: If it's possible to write a wrapper using yt-dlp as a library, with a hook, it'd be a viable options

TYPO3 CMS 9.5.5 most simple extension

I have to create a simple TYPO3 extension for version 9.5.5.
i installed TYPO3 CMS 9.5.5 from https://bitnami.com/stack/typo3
in docu for latest (9-dev)
https://docs.typo3.org/typo3cms/CoreApiReference/ExtensionArchitecture/FilesAndLocations/Index.html
they say "usually located in typo3conf/ext for local extensions, or typo3/sysext for system extensions."
i dont have a "typo3conf/ext", no "typo3conf" and "typo3/ext" . and yes there is a "typo3/sysext".
I have not found a guide online that takes this fact into account.
Then i read "... there is a tool which makes it easier to start. It is called Extension builder" ( https://docs.typo3.org/typo3cms/CoreApiReference/ExtensionArchitecture/CreateNewExtension/Index.html )
Ttherefore I have installed this "Extension Builder"
via Zip from https://extensions.typo3.org/extension/extension_builder/
Download ZIP file
Log into your TYPO3 backend
Go to Extension Manager module
Press the upload button on the top bar
Select the ZIP file and upload it.
and with me it looks very different as in the documentation:
then i read "Docs » Creating a first extension » Create Folder Structure And Configuration Files" (https://docs.typo3.org/typo3cms/ExtbaseFluidBook/4-FirstExtension/2-create-folder-structure-and-configuration-files.html)
There they talk about "unique identifier of our extension". whats this?
"as store_inventory". whats this?
anyway.
and "These are in the folder typo3conf/ext/"
but this folder does not exist in my installation.
I then looked into an installation of another computer days later and there was this folder also not.
anyway.
i created then "typo3conf/ext/store_inventory" (as described there).
then I wondered about the following formulation:
"The name of this folder must be written like the extension key"
So this folder probably had to be different named?
then i found this folder structure at the same page:
https://docs.typo3.org/typo3cms/ExtbaseFluidBook/_images/figure-4-1.png
and I wondered a lot about the amount of folders and files.
I just wanted to make a simple extension that just lists files.
I thought that's a few lines of source code.
is not that any easier?
I do not need all these things like eg. ext_icon.gif. i hope i do not need to create all that files and folder manually.
Here are some answers:
The extension key is the name of your folder inside of "typo3conf/ext". I recommend not using an underscore because it might be confusing for you later on as a beginner with TYPO3. Choose a simple and short name. To make sure the name is not available already, please check "extensions.typo3.org" to see if the key (extension name) is already taken. If you want to be 100% sure, you have to register an account there and register the extension key officially. This is all free of course.
The file ext_icon.gif is indeed not necessary, but looks nice when your extension is shown in the list of extensions in the Extension Manager of TYPO3.
You say you want to "list files". I guess you are talking about static files like images etc. that you have in your fileadmin folder already?
So in this case you need a minimum folder structure like this:
store_inventory
Classes
Controller
StoreController.php (Contains PHP function "filesList")
Configuration
TypoScript
Resources
Private
Templates
Files.html (Contains HTML/Fluid-Code for Frontend)
ext_emconf.php (Contains necessary information about your Ext.)
ext_localconf.php (Contains registration of Frontend-Plugin/Controller)
A more detailed answer requires more information about your extension's exact requirements. Here are some more links that I think you might need for this project:
ext_emconf.php
https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ExtensionArchitecture/DeclarationFile/Index.html#
ext_localconf.php
https://docs.typo3.org/m/typo3/book-extbasefluid/master/en-us/4-FirstExtension/7-configuring-the-plugin.html
Controllers and Actions:
https://docs.typo3.org/m/typo3/book-extbasefluid/master/en-us/7-Controllers/1-Creating-Controllers-and-Actions.html
Your Controller needs to have a function called for instance "fileAction" and the template file for this "Action" must be named "File.html" in order to work. If you name the action "fileListAction", your template file must be named "FileList.html" and so on...
There are some other small things to think about, but I don't know enough about your exact requirements. If you have any trouble, don't hesitate to ask more questions!
I know, TYPO3 can be frustrating. I do it for decades already ;)
Good luck

Save comments in config.yml with api spigot/bukkit

I have a config.yml file that has some comments like:
#Thats the message when someone joins to the server
Message: Hello User
But when I save the config.yml file and open again it vanishes and can't be saved.
I tried to search some api for this problem but could not find.
I dont want to use
saveDefaultConfig();
or
getConfig().options.copydefault(true);
saveConfig();
because I dont want to save this trough code. I want to save this with api.
What api should I use?
I would recommend you to use the Spigot API, on my opinion it's the better one
Both API's only support ONE comment in the header section of the config. If you want to save more than one comment you should code your own YAMLConfiguration
To save this one header you should try
getConfig().options().header("Your Comment");
getConfig().options().copyHeader(true)
You can seperate the comment with \n into mutliple lines
You can create a config.yml inside your src folder which will be included into the jar. You can set your default values and any comments by editing this file in your IDE. All you have to do in your main class is calling saveDefaultConfig(); in your onEnable(). After that, you can use getConfig() to access your configuration.
Thats sadly not possible when using the given Tools!
You need to manually write your own ConfigManager where you can do that!
Here is what I got: https://mega.nz/#!lsIkVYhD!knZr5DBmbvPyJh8ONeNx4pfb7Q0C9yuIp6FHiyJmhBw
It may however have a few bugs :D
As stated, the Yaml API provided with Bukkit will strip comments when it is written to. So you can comment your resource config file but comments are lost when it is saved or re-written by the API.
My preferred Yaml handler is SimplixStorage. It handles comments well both at the top and anywhere inside a yaml file. I also found SimpleConfig which allows you to add header, add comments (which are not removed on file saves), as well as add to config with your code.

What's the difference between 'pelican ./content' and 'make html'?

I start studying Pelican today because I want to move my blog from wordpress to pelican.
However, after reading the docs, I still don't know the difference between pelican ./content and make html. They both seem to generate a static website. Besides, pelican ./content always returns a UnicodeDecodeError** for me, whilepelican ./content` does not.
What's the difference between them and why?
In the folder where you use $ pelican-quickstart, you will find a file named Makefile.
You will find a line like this html: clean $(OUTPUTDIR)/index.html, and $(OUTPUTDIR)/%.html:
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS).
This file show you what pelican have done when you type make ***, and you can config many other things in this file.
pelican ./content runs the generation of the website using defaults and trying to guess the location of your content, output and configuration files.
make html calls pelican, but explicitly gives it the input directory, the output directory, the configuration file and, optionally, some extra options.
Basically, make html (along with make regenerate) are convenience methods that make the job a bit easier for you. In any case, you should run make publish to generate the content that is to be uploaded to your web server, as it loads the publishconf.py files, which define a few extra options (the rss feeds) and allows you to change settings for the "proper" website.

Runtime xml/json generation of directory content

For an ios app I try to develop, I need to get a listing of the content of an online directory. (My app works with local directories but I'm trying to edit it so it works with an online directory)
I've been looking into this a lot but I can't manage to find the best solution to do this. (I learned you can't read the contents of an online directory and subdirectories with objective-c and print them to an array to display them in, for example, a tableview).
I did learn how to create a connection and output the html of a certain page (or an xml file). That's why I was wondering... Is there a way (webservice?) to generate an xml/JSON/html file that prints the content of a directory (if possible also subdirectories)? The generation of this xml/JSON/html has to be done at runtime, the moment my app asks for the file, since people will be able to add files (pdf's, video's,...) to the directory via FTP. (editing the xml/JSON file everytime is not an option).
Any help would be very much appreciated.
You could create a simple webservice in many ways. For example, with PHP you could write something like this:
<?php
$dir = '/myDir';
$files = scandir($dir);
echo json_encode($files);
?>
Then just point your app to get the contents of that page and parse the JSON.
scandir: http://php.net/manual/en/function.scandir.php
json_encode: http://php.net/manual/en/function.json-encode.php