|
1 |
| -# Code Snippets Collections |
| 1 | +# DelphiDabbler Code Snippets Collection |
2 | 2 |
|
3 |
| -This repository is used to store a collection of reusable code snippets, mainly in Pascal. |
| 3 | +## Overview |
4 | 4 |
|
5 |
| -> **NOTE:** Further collections may be added in the future. |
| 5 | +This repository contains a collection of over 600 reusable Pascal code snippets. The majority are simple functions and procedures but there are also some constants and type definitions, including some advanced records with methods. |
| 6 | + |
| 7 | +Snippets are grouped into categories, with each snippet belonging to exactly one category. |
| 8 | + |
| 9 | +All of the snippets have been tested to some extent: some received basic testing while others have been tested more comprehensively. The collection contains details of the level of testing each snippet received. |
6 | 10 |
|
7 | 11 | ## Purpose
|
8 | 12 |
|
9 |
| -The purpose of this repository is to provide collections of snippets for use with the _DelphiDabbler [CodeSnip](https://github.com/delphidabbler/codesnip)_ program. |
| 13 | +The primary purpose of the collection is for use with the _DelphiDabbler [CodeSnip](https://github.com/delphidabbler/codesnip)_ program. |
| 14 | + |
| 15 | +However the intent is that other applications will also be able to use the collection by parsing the meta data provided with it. |
| 16 | + |
| 17 | +## Documentation |
| 18 | + |
| 19 | +The collection data format is [fully documented](https://htmlpreview.github.io/?https://github.com/delphidabbler/code-snippets/blob/master/docs/index.html) in `docs` directory. |
| 20 | + |
| 21 | +## Using the Collection |
| 22 | + |
| 23 | +Anyone is welcome to write applications or web pages that access the snippets in the collection, subject to the terms of the license (see below). You should read the collection's documentation which explains the file formats in detail. |
| 24 | + |
| 25 | +⚠️ Implementers **must not** read the collection data directly from this GitHub repository - that could generate more than the permitted amount of traffic. Instead you must download a release from the _Releases_ tab and either distribute the collection with the application or host it on a web server. |
10 | 26 |
|
11 |
| -However the intent is that other applications will also be able to use the collections by parsing the meta data provided with the collections. It is intended that the meta data will be fully documented. |
| 27 | +## Tests |
12 | 28 |
|
13 |
| -## Collections |
| 29 | +Unit tests and demonstration projects are available for _some_ of the snippets. |
14 | 30 |
|
15 |
| -So far there is just one collection, the _DelphiDabbler Code Snippets Database_. This collection is version 2 of the database. It is designed for use with _CodeSnip_ v4.16 and later. |
| 31 | +Source code for these tests and demonstrations is available in the `tests` directory. There is a sub-directory for each category where such code is available. |
16 | 32 |
|
17 |
| -> The collection is not compatible with versions of _CodeSnip_ up to v4.15.1. |
| 33 | +See the `README.md` file in the `tests` directory for full details. |
18 | 34 |
|
19 |
| -The collection can be found in the `csdb` directory. The actual collection is contained in the `collection` sub-directory and it is documented in the `docs` sub-directory - see `collection-format.html` for further information. |
| 35 | +## Releases |
| 36 | + |
| 37 | +Releases can be found on the `releases` tab on the GitHub project page. |
| 38 | + |
| 39 | +Each release[^1] comprises three zip files, as follows (replace `X.Y.X` in the file names with the release version number): |
| 40 | + |
| 41 | +* `csdb-vX.Y.Z-data.zip` - Contains all the data in the collection. Required by applications that access the collection. |
| 42 | +* `csdb-vX.Y.Z-docs.zip` - Contains the documentation developers need to understand the structure of the data. |
| 43 | +* `csdb-vX.Y.Z-tests.zip` - Contains the unit tests and demo code. |
20 | 44 |
|
21 | 45 | ## Development
|
22 | 46 |
|
23 | 47 | This repo uses the [Git Flow](http://nvie.com/posts/a-successful-git-branching-model/) methodology - i.e. development proceeds on the `develop` branch and `feature` branches off it. Only released content appears on the `master` branch.
|
24 | 48 |
|
25 |
| -## Licenses |
| 49 | +## History & Changes |
| 50 | + |
| 51 | +This repository contains version 2 of the collection. |
| 52 | + |
| 53 | +Version 1 was designed exclusively for use with _DelphiDabbler [CodeSnip](https://github.com/delphidabbler/codesnip)_ (v4.15.1 and earlier). It was downloaded by the program directly from a web service on DelphiDabbler.com. This version was not developed under Git and is longer available. |
| 54 | + |
| 55 | +Version 2 is designed to be able to be used by other applications in addition to _CodeSnip_ (v4.16.0 or later). This version is **not** backwards compatible with version 1. |
| 56 | + |
| 57 | +The project's change log can be found in `CHANGELOG.md`. |
| 58 | + |
| 59 | +## License |
26 | 60 |
|
27 |
| -The license that applies to this project can be found in `LICENSE.md` in the repo's root directory. |
| 61 | +This project is MIT Licensed. See `LICENSE.md` for full details. |
28 | 62 |
|
29 |
| -Code snippets in collections may have a different license or licenses. See the documentation of each collection for details. |
| 63 | +[^1]: `csdb-vX.Y.Z-tests.zip` was only available from v2.0.1. |
0 commit comments