I am reading on the article how to generate an Apple-like HTML documentation at here. My questions are what the command lines are used for. How can we combine command lines and appledoc xcode project to generate a HTML.
I'm the author of appledoc tool. The tool is intended to be used as answered by Caleb above. Recommended installation method is to clone repository from GitHub, open project in Xcode, build and optionally copy binary to your path as suggested above. Additionally, you must also copy template files required for running the tool to one of predefined paths. All the steps required are described in the readme file on appledoc page on GitHub, see Quick Install section.
There are also other methods for installing - all contribution from users:
You can use install-appledoc.sh script included in the git repository.
There's also homebrew recipe available, although it doesn't install template files to my understanding (see this link).
For any additional questions go to appledoc Google group. I just created it few days ago, so there's no content at the moment of this writing, but feel free to ask questions there.
I haven't used 'appledoc', but from a quick look at the page you linked it appears that it's an open-source command-line utility. So the first step will be to compile the 'appledoc' program itself, and then stick it in a directory that's in your path, such as /usr/local/bin or ~/bin/.
The next step is to try to use it to generate some documentation (assuming that you've already created the markdown files that it consumes). Open a terminal window, navigate to the directory where your files are, and then use the command given at the top of the page that you linked:
appledoc --project-name appledoc --project-company "Gentle Bytes" --company-id com.gentlebytes --output ~/help .
If you want to use 'appledoc' to regenerate your documentation every time you build some project, you can add a "Run Script" build phase to an existing target in your project, or create a new target just for documentation that has nothing but a "Run Script" build phase. Either way, the script in that phase should be shell script containing a command similar to the one above (though you'll probably want to specify the source directory explicitly rather than just using the 'current' directory, i.e. .).
As I found on this post, you can generate a complete HTML documentation of your code with this command line:
appledoc --project-name BabelCPP --project-company "My Name"
--company-id com.mycompany --no-create-docset --output ./doc/ .
The last "." is the path to your code.
Related
I've been wrestling with godoc and found that "go doc" is more for providing usage help from the command line for instance:
go doc -cmd -u
lists the package comment and any functions (or other entities)
go doc *function*
then shows the documentation for an individual function (or other entity)
It seems there is a related tool called godoc.
godoc also seems to generate html on a per package and function basis.
E.g.
godoc -html hello
Generates html containing the package comment only to stdout
godoc is a really confusing name given we have go doc as well!
How can I create static documentation for the whole project?
This is similar to Godoc, create html for entire package which may have been misinterpreted as asking about documentation for packages rather than projects.
I want a build step I can use in a project that may in principle contain many packages and apps.
is there a canonical way to generate documentation for offline use even using godoc?
Go 1.12 (February 2019) is clearer on that:
godoc and go doc
In Go 1.12, godoc no longer has a command-line interface and is only a web server.
Users should use go doc for command-line help output instead.
go doc now supports the -all flag, which will cause it to print all exported APIs and their documentation, as the godoc command line used to do.
cmd/doc: add -all flag to print all documentation for package
Unlike the one for the old godoc, you need the -u flag to see unexported symbols.
This seems like the right behavior: it's consistent.
I was struggling to do this and finally, the thing that worked for me is
make sure you have "wget" installed(I am using mac, so had to install it using x-code)
log in as root user and modify the file called "robots.txt" to remove the line "Disallow : /" as this prevents wget to download the site recursively. The "robots.txt" file should be in $GOROOT path.
open a cmd and start the godocs server using the below command
godoc -http=:6060
I have my local path configured to this port.
Open another cmd and run the below command.
wget -r -np -N -E -p -k http://localhost:6060/pkg/myproject
you can mention the path of the project to have the html docs downloaded for entire project.
You can try Golds, which is an alternate Go docs generation tool (and a local docs server / code reader).
Under your project directory, you can run any of the following commands to generate HTML docs for your Go project:
golds -gen -nouses -plainsrc -wdpkgs-listing=promoted ./...
golds -gen -nouses -wdpkgs-listing=promoted ./...
golds -gen -wdpkgs-listing=promoted ./...
The first command generates the most compact docs and the last one generates the full docs, which size is 6 times of the compact docs.
BTW, I'm the author of Golds. Hope you this tool would satisfy your need.
This can be also achieved using simple wget command for that. Example: snippet
I have a similar issue with that. I'm using GitLab for my projects and I have decide to create and share with some handy GitLab CI YAML templates for Go projects that will automatically generate a static HTML Go documentation without any external packages: https://gitlab.com/tymonx/gitlab-ci
Example: Go Logger documentation
Two nice features:
Embedded Go source code files
Search box is referencing to GitLab
I want to link to another extra file from my README using Yard.
For example, I have the following line:
...detailed instructions [here](contributing.md) on how to contribute
I want this to link to my file contributing.md in the same directory. I can include the extra file in my .yardopts file, and it will show up in the file list as it should.
So then I found that I can use the yard DSL to make the link work:
...detailed instructions {file:contributing.md here} on how to contribute
However this will not work if the README is being read from Github. Am I naive to want to have it both ways?
Is there a way to link to another .md extra file in markdown using Yard?
I am not sure what you mean with 'if the README is being read from Github'.
The following works for me locally
I add a file to the README via {file:my_file.md test}
I tell yard via the --files command-line option that there is an extra file. The link to 'test' appears in the README. For example in the following way:
bundle exec yard --files my_file.md
I'm on Ubuntu 14.04 and I would like to create a build of CKEditor. I've read: http://docs.ckeditor.com/#!/guide/dev_build.
First issue: I don't have any "build.sh" in my CKEditor folder. Solution: download https://github.com/ckeditor/ckeditor-dev/blob/master/dev/builder/build.sh .
Second issue: the build.sh above is not totaly correct, I had to modify some locations (e.g. "../.." instead of "."). But I think it's now ok since I don't have messages like "file not found" anymore...
Third issue: I've several warnings like:
WARNING: it was impossible to update the lang property in /home/sebsheep/progs_div/albums_tests/ckeditor/release/ckeditor/plugins/youtube/plugin.js
Moreover, I've the impression that CKBuilder only copy my initial folder recursively, as we can see with "/ckeditor/release/ckeditor/release/ckeditor/release/ckeditor/release/ckeditor/release/ckeditor" (thoses files actually are on my disc) on this message:
WARNING: it was impossible to update the lang property in /home/sebsheep/progs_div/albums_tests/ckeditor/release/ckeditor/release/ckeditor/release/ckeditor/release/ckeditor/release/ckeditor/plugins/indent/plugin.js
Those warnings never stop, I have to C-c in order to stop the program.
What am I doing wrong?
I guess that you tried to build CKEditor using a built version which obviously does not contain necessary tools.
To build CKEditor from source:
Clone CKEditor development repository, or just download it if you don't know git.
Add 3rd party plugins to the plugins/ directory.
Modify dev/builder/build-config.js (edit the list of plugins).
Run dev/builder/build.sh
I want to use oclint (an Objective-C static analyzer) for my projects but the official documentation does not clearly describe how to configure it.
How do I use it?
I have installed the oclint package then copied the script for capturing projects configs into a project's folder. Running this script creates an empty file named compile_commands.json and it does not fill xcodebuild.log with any data.
Thank you!
I don't think this script will add anything into xcodebuild.log. It reads from it. You may want to manually run xcodebuild and save the output into xcodebuild.log before running the script.
Check out the documentation.
I have had luck with the manual route of copying the script into my project's folder then executing it on the command line.
Though this does not integrate oclint's functionality into XCode, it does provide feedback via stdout.
From this feedback I then update my code to align with oclint's recommendation and iteratively run oclint until my code complies with oclint's rules.
I installed Mogenerator. Now what do I do? How do I use it?
The first problem I have is that I have no idea where it was installed to. During the install process, it only let me select the hard drive to install it on, not the directory. The most natural location would be the Applications folder, but it isn't there.
Next, the readme (which I found online) states:
Xmo'd works by noticing when your
*.xcdatamodel is saved. If the model file's Xcode project item comment
contains xmod, an AppleScript is fired
that creates a folder based on your
model's file name and populates it
with derived source code files from
your model. It then adds the new
folder to your project as a Group
Reference and adds all the source
files to your project.
There are several issues with the above statement that aren't clear:
What does "the model file's Xcode project item comment" refer to? How can I make it contain "xmod"?
Is adding this comment and having mogenerator monitor the .xcdatamodel file the only way to use mogenerator? Is there any way I can manually run mogenerator so that it recreates the generated files?
One more caveat to be aware of: You have to already set the Class properties of your entities to something different than NSManagedObject. Otherwise Xmo'd won't do anything.
Note: Xmo'd currently doesn't work with Xcode 4/5, afaik.
What I do is just add a "MOGenerator" target in Xcode:
Go to your project and click on "Add Target..." in the "Targets" section.
Choose "iOS -> Other -> Aggregate"
Go to "Build Phases"
Select from the Menu "Editor -> Add Build Phase -> Add Run Script Build Phase"
Paste your MOGenerator command into the Run Script section, for example:
PATH=${PATH}:/usr/local/bin
cd "${PROJECT_DIR}/MyApp"
mogenerator --human-dir Classes --machine-dir MOGenerated --model MyApp.xcdatamodeld/MyApp.xcdatamodel --template-var arc=true
Now you can update your MOGenerator-generated by simply running this target.
mogenerator is a script that is installed into your developer directory as I recall. However it might be installed into the Xcode scripts directory under your ~/Library.
What do you mean by manually triggering the application? You can trigger a build by "touching" the data model. Any save on the data model will trigger the build
In Xcode if you select the model file and hit ⌘I you will get its metadata. Click on the comments tab and add xmod there. mogenerator looks for that comment to know if it should generate files.
Update
You can run mogenerator from the command line as well as have it monitor your files. Type mogenerator --help in the Terminal to see the options.
I searched my hard drive and found the following files:
The application is installed to: /usr/bin/mogenerator.
The /Library/Application Support/mogenerator/ directory contains some .motemplate files.
⌘I doesn't work in Xcode 4 any more. please check out the command line tool. Here is the doc
Studying line 22 of make_installer.command, I found that /Developer/Library/Xcode/Plug-ins/Xmod.pbplugin is also installed.
And then, searching mogenerator GitHub Issues for "uninstall," I found official instructions on how to uninstall mogenerator from the creator himself.
using mogenerator:
download mogenerator
run and build the mogenerator project
locate the built file in the product group
copy the built file in to /usr/bin directory
in the terminal copy this code and hit enter:
mogenerator -m /Users/hashem/Desktop/Projects/myApp/myAppModel.xcdatamodel -O /Users/hashem/Desktop/Projects/myApp/managedObjects --template-var arc=true
NOTE: here first I have entered myApp.xcdatamodel file path, and next path is the location of generated files. if the file path contains space character be sure to add \ character before space in the file path. like /desktop/xcode\ projects/myApp/....
enjoy!