diff --git a/Documentation/Books/Makefile b/Documentation/Books/Makefile index 5e6fa9f36a..a1aac950ea 100644 --- a/Documentation/Books/Makefile +++ b/Documentation/Books/Makefile @@ -3,6 +3,7 @@ all: build-books .PHONY: md-files MDPP_FILES = $(wildcard *.mdpp */*.mdpp */*/*.mdpp) +MD_FILES = $(wildcard Users/*/*.md) md-files: @for file in $(basename $(MDPP_FILES)); do echo "converting $${file}.mdpp"; markdown-pp.py $${file}.mdpp $${file}.md; done @@ -18,3 +19,5 @@ build-book: @test -d books/$(NAME) || mkdir books/$(NAME) cd $(NAME) && gitbook build -o ../books/$(NAME) cp Users/arangodb_logo2.png books/Users/ + @for file in $(basename $(MD_FILES)); do echo "remove $${file}.md";rm $${file}.md;done + \ No newline at end of file diff --git a/Documentation/Books/Users/Collections/CollectionAddress.mdpp b/Documentation/Books/Users/Collections/CollectionAddress.mdpp deleted file mode 100644 index 51f7528fd5..0000000000 --- a/Documentation/Books/Users/Collections/CollectionAddress.mdpp +++ /dev/null @@ -1,32 +0,0 @@ -!CHAPTER Address of a Collection - -All collections in ArangoDB have an unique identifier and an unique -name. ArangoDB internally uses the collection's unique identifier to look up -collections. This identifier, however, is managed by ArangoDB and the user has -no control over it. In order to allow users to use their own names, each collection - also has an unique name which is specified by the user. To access a collection -from the user perspective, the collection name should be used, i.e.: - -*db._collection(collection-name)* - -A collection is created by a ["db._create"](../Collections/DatabaseMethods.md) call. - -For example: Assume that the collection identifier is `7254820` and the name is -`demo`, then the collection can be accessed as: - - db._collection("demo") - -If no collection with such a name exists, then *null* is returned. - -There is a short-cut that can be used for non-system collections: - -*db.collection-name* - -This call will either return the collection named *db.collection-name* or create -a new one with that name and a set of default properties. - -Note: Creating a collection on the fly using *db.collection-name* is -not recommend and does not work in _arangosh_. To create a new collection, please -use - -*db._create(collection-name)* diff --git a/Documentation/Books/Users/Collections/CollectionMethods.mdpp b/Documentation/Books/Users/Collections/CollectionMethods.mdpp index acce41fad0..78d6839c88 100644 --- a/Documentation/Books/Users/Collections/CollectionMethods.mdpp +++ b/Documentation/Books/Users/Collections/CollectionMethods.mdpp @@ -1,6 +1,7 @@ !CHAPTER Collection Methods `collection.drop()` + Drops a collection and all its indexes. *Examples* diff --git a/Documentation/Books/Users/Collections/README.mdpp b/Documentation/Books/Users/Collections/README.mdpp index 63f173a91a..c07b5367a8 100644 --- a/Documentation/Books/Users/Collections/README.mdpp +++ b/Documentation/Books/Users/Collections/README.mdpp @@ -7,4 +7,40 @@ corresponding language API. The most import call is the call to create a new collection \ No newline at end of file +--> + + +!SECTION Address of a Collection + +All collections in ArangoDB have an unique identifier and an unique +name. ArangoDB internally uses the collection's unique identifier to look up +collections. This identifier, however, is managed by ArangoDB and the user has +no control over it. In order to allow users to use their own names, each collection + also has an unique name which is specified by the user. To access a collection +from the user perspective, the collection name should be used, i.e.: + +`db._collection(collection-name)`` + +A collection is created by a ["db._create"](../Collections/DatabaseMethods.md) call. + +For example: Assume that the collection identifier is `7254820` and the name is +`demo`, then the collection can be accessed as: + + db._collection("demo") + +If no collection with such a name exists, then *null* is returned. + +There is a short-cut that can be used for non-system collections: + +*db.collection-name* + +This call will either return the collection named *db.collection-name* or create +a new one with that name and a set of default properties. + +Note: Creating a collection on the fly using *db.collection-name* is +not recommend and does not work in _arangosh_. To create a new collection, please +use + +`db._create(collection-name)` + +This call will create a new collection called *collection-name*. \ No newline at end of file diff --git a/Documentation/Books/Users/Databases/Notes.mdpp b/Documentation/Books/Users/Databases/Notes.mdpp index 2f15d6617b..cbaf967283 100644 --- a/Documentation/Books/Users/Databases/Notes.mdpp +++ b/Documentation/Books/Users/Databases/Notes.mdpp @@ -1,10 +1,12 @@ !CHAPTER Notes about Databases Please keep in mind that each database contains its own system collections, -which need to set up when a database is created. This will make the creation -of a database take a while. Replication is configured on a per-database level, -meaning that any replication logging or applying for a new database must -be configured explicitly after a new database has been created. Foxx applications +which need to set up when a database is created. This will make the creation of a database take a while. + +Replication is configured on a per-database level, meaning that any replication logging or applying for a new database must +be configured explicitly after a new database has been created. + +Foxx applications are also available only in the context of the database they have been installed in. A new database will only provide access to the system applications shipped with ArangoDB (that is the web interface at the moment) and no other Foxx diff --git a/Documentation/Books/Users/SUMMARY.md b/Documentation/Books/Users/SUMMARY.md index 2baf1502f3..7f6e608ebb 100644 --- a/Documentation/Books/Users/SUMMARY.md +++ b/Documentation/Books/Users/SUMMARY.md @@ -24,7 +24,6 @@ * [Notes about Databases](Databases/Notes.md) * [Handling Collections](Collections/README.md) - * [Address of a Collection](Collections/CollectionAddress.md) * [Collection Methods](Collections/CollectionMethods.md) * [Database Methods](Collections/DatabaseMethods.md) diff --git a/Documentation/Books/codeBlockReader.py b/Documentation/Books/codeBlockReader.py index ef57cffc9e..165ed6d6b8 100644 --- a/Documentation/Books/codeBlockReader.py +++ b/Documentation/Books/codeBlockReader.py @@ -1,6 +1,7 @@ import os import inspect - + + def file_content(filepath): """ Fetches and formats file's content to perform the required operation. """ @@ -28,7 +29,7 @@ def fetch_comments(dirpath): """ comments_filename = "allComments.txt" - fh = open(comments_filename, "w") + fh = open(comments_filename, "a") for root, directories, files in os.walk(dirpath): for filename in files: @@ -37,7 +38,7 @@ def fetch_comments(dirpath): for comment in file_comments: fh.write("\n\n" % filename) for _com in comment: - _text = _com.replace("/", "") + _text = _com.replace("///", "") if len(_text.strip()) == 0: _text = _text.replace("\n", "
") _text = _text.strip() @@ -51,5 +52,15 @@ def fetch_comments(dirpath): fh.close() if __name__ == "__main__": - dirpath = "/Users/Thomas/code/ArangoDB" - fetch_comments(dirpath) + open("allComments.txt", "w").close() + path = ["arangod/cluster","arangod/RestHandler","arangod/V8Server", + "lib/Admin","lib/HttpServer", + "js/actions","js/client","js/apps","js/common","js/server"] + for i in path: + dirpath = os.path.abspath(os.path.join(os.path.dirname( __file__ ), os.pardir,"ArangoDB/../../"+i)) + fetch_comments(dirpath) + print dirpath + + + os.path.abspath(os.path.join(os.path.dirname( __file__ ), '..', 'templates')) + \ No newline at end of file