view release on metacpan or search on metacpan
lib/Data/Edit/Xml/Reuse.pm view on Meta::CPAN
use Carp qw(confess cluck);
use Data::Dump qw(dump);
use Data::Edit::Xml;
use Data::Edit::Xml::Xref;
use Data::Table::Text qw(:all);
use Dita::GB::Standard;
use Storable qw(store retrieve);
use Time::HiRes qw(time);
use utf8;
#D1 Reuse Xml # Reuse Xml via Dita conrefs.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Edit/Xml/To/DitaVb.pm view on Meta::CPAN
use Data::Dump qw(dump);
use Data::Edit::Xml;
use Data::Edit::Xml::Lint;
use Data::Edit::Xml::Xref;
use Data::Table::Text qw(:all);
use Dita::GB::Standard qw(:all);
use Flip::Flop;
use GitHub::Crud;
use Scalar::Util qw(blessed);
use Time::HiRes qw(time);
use utf8;
lib/Data/Edit/Xml/To/DitaVb.pm view on Meta::CPAN
Mask bad references using M3: the Monroe Masking Method if true
=head2 fixDitaRefs
Fix references in a corpus of L<Dita|http://docs.oasis-open.org/dita/dita/v1.3/os/part2-tech-content/dita-v1.3-os-part2-tech-content.html> documents that have been converted to the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>.
=head2 fixFailingFiles
Fix failing files in the L<testFails|/testFails> folder if this attribute is true
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Edit/Xml/Xref.pm view on Meta::CPAN
use strict;
use Carp qw(confess cluck);
use Data::Dump qw(dump);
use Data::Edit::Xml;
use Data::Table::Text qw(:all);
use Dita::GB::Standard;
use Storable qw(store retrieve);
use Time::HiRes qw(time);
use utf8;
#sub improvementLength {80} #P Maximum length of the test of an improvement suggestion
lib/Data/Edit/Xml/Xref.pm view on Meta::CPAN
fixedRefsNoAction => [], # [] hrefs and conrefs from L<fixRefs|/fixRefs> for which no action was taken.
fixRefs => {}, # {file}{ref} where the href or conref target is not valid.
fixRelocatedRefs => undef, #I Fix references to topics that have been moved around in the out folder structure assuming that all file names are unique which they will be if they have been renamed t...
fixXrefsByTitle => undef, #I Try to fix invalid xrefs by the Gearhart Title Method enhanced by the Monroe map method if true
flattenFiles => {}, # {old full file name} = file renamed to Gearhart-Brenan file naming standard
flattenFolder => undef, #I Files are renamed to the Gearhart standard and placed in this folder if set. References to the unflattened files are updated to references to the flattened files. Th...
getFileUrl => qq(/cgi-bin/uiSelfServiceXref/client.pl?getFile=), #I A url to retrieve a specified file from the server running xref used in generating html reports. The complete url is obtained by appending the fully qualified file nam...
goodImageFiles => {}, # {file}++ : number of references to each good image
goodNavTitles => {}, # Details of nav titles that were resolved.
guidHrefs => {}, # {file}{href} = location where href starts with GUID- and is thus probably a guid.
guidToFile => {}, # {topic id which is a guid} = file defining topic id.
lib/Data/Edit/Xml/Xref.pm view on Meta::CPAN
my $md5 = $xref->md5Sum->{$iFile} = -M $x; # Md5 sum for parse tree
if ($Xref->flattenFolder)
{$xref->flattenFiles->{$iFile} = # Record correspondence between existing file and its GB Standard file name
Dita::GB::Standard::gbStandardFileName($source, fe($iFile), md5=>$md5);
}
my $saveReference = sub # Save a reference so it can be integrity checked later
{my ($ref) = @_; # Reference
return if externalReference($ref); # Looks like an external reference
lib/Data/Edit/Xml/Xref.pm view on Meta::CPAN
B<deleteUnusedIds> - Delete ids (except on topics) that are not referenced in any reference in the corpus regardless of the file component of any such reference.
B<fixBadRefs> - Fix any remaining bad references after any all allowed attempts have been made to fix failing references by moving the failing reference to the B<xtrf> attribute i.e. placing it in B<M3> possibly renaming the tag to B<ph> if L<changeB...
B<fixDitaRefs> - Fix references in a corpus of L<Dita|http://docs.oasis-open.org/dita/dita/v1.3/os/part2-tech-content/dita-v1.3-os-part2-tech-content.html> documents that have been converted to the L<GB Standard|http://metacpan.org/pod/Dita::GB::Stan...
B<fixRelocatedRefs> - Fix references to topics that have been moved around in the out folder structure assuming that all file names are unique which they will be if they have been renamed to the GB Standard.
B<fixXrefsByTitle> - Try to fix invalid xrefs by the Gearhart Title Method enhanced by the Monroe map method if true
B<fixedFolder> - Fixed files are placed in this folder.
B<fixedFolderTemp> - Fixed files are placed in this folder if we are on aws but nit the session leader - this folder is then copied back to L<fixedFolder> on the session leader.
B<flattenFolder> - Files are renamed to the Gearhart standard and placed in this folder if set. References to the unflattened files are updated to references to the flattened files. This option will eventually be deprecated as the Dita::GB::Standar...
B<getFileUrl> - A url to retrieve a specified file from the server running xref used in generating html reports. The complete url is obtained by appending the fully qualified file name to this value.
B<html> - Generate html version of reports in this folder if supplied
lib/Data/Edit/Xml/Xref.pm view on Meta::CPAN
1 $xref Xref results
2 $file File to fix
=head2 fixFilesGB($xref)
Rename files to the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>
Parameter Description
1 $xref Xref results
=head2 analyzeOneFileParallel($Xref, $iFile)
lib/Data/Edit/Xml/Xref.pm view on Meta::CPAN
46 L<editXml|/editXml> - Edit an xml file retaining any existing XML headers and lint trailers
47 L<externalReference|/externalReference> - Check for an external reference
48 L<fixFilesGB|/fixFilesGB> - Rename files to the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>
49 L<fixingRun|/fixingRun> - A fixing run fixes problems where it can and thus induces changes which might make the updated output different from the incoming source.
50 L<fixOneFileGB|/fixOneFileGB> - Fix one file to the Gearhart-Brenan standard
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Table/Text.pm view on Meta::CPAN
fusion => [q(fusion), "https://en.wikipedia.org/wiki/Nuclear_fusion" ],
future => [q(future), "https://en.wikipedia.org/wiki/Future" ],
gantryCrane => [q(Gantry Crane), "https://en.wikipedia.org/wiki/Gantry_crane" ],
gaTe => [q(gate), "https://en.wikipedia.org/wiki/Logic_gate" ],
Gauss => [q(Karl Friedrich Gauss), "https://en.wikipedia.org/wiki/Carl_Friedrich_Gauss#Anecdotes" ],
gbstandard => [q(GB Standard), "http://metacpan.org/pod/Dita::GB::Standard" ],
gcc => [q(gcc), "https://en.wikipedia.org/wiki/GNU_Compiler_Collection" ],
gdpr => [q(European Directive on Data Protection), "https://gdpr.eu" ],
gds2 => [q(Graphic Design System 2), "https://en.wikipedia.org/wiki/GDSII" ],
geany => [q(Geany), "https://www.geany.org" ],
ghc => [q(Github Automation), "https://metacpan.org/release/GitHub-Crud" ],
view all matches for this distribution
view release on metacpan or search on metacpan
Notes/cpan-namespaces/cpan-namespaces-L1-L3.txt view on Meta::CPAN
Distribution::Metadata
Distribution::Metadata::Factory
Dita
Dita::Extend
Dita::GB
Dita::GB::Standard
Dita::PCD
DjVu
DjVu::Detect
Do
Doc
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dita/GB/Standard/Types.pm view on Meta::CPAN
#-------------------------------------------------------------------------------
# The Types of Corpus Available in the Gearhart-Brenan File Naming Standard
# Philip R Brenan at gmail dot com, Appa Apps Ltd Inc., 2019
#-------------------------------------------------------------------------------
# podDocumentation
package Dita::GB::Standard::Types;
our $VERSION = 20190911;
require v5.24;
use warnings FATAL => qw(all);
use strict;
lib/Dita/GB/Standard/Types.pm view on Meta::CPAN
=encoding utf-8
=head1 Name
Dita::GB::Standard::Types - The Types of Corpus Available in the
Gearhart-Brenan File Naming Standard.
=head1 Synopsis
The B<GB Standard> is one way of naming files to enable global collaboration
lib/Dita/GB/Standard/Types.pm view on Meta::CPAN
=head2 Dita
The B<Dita> corpus contains topic and map files that conform to the
L<Dita|http://docs.oasis-open.org/dita/dita/v1.3/os/part2-tech-content/dita-v1.3-os-part2-tech-content.html>
standard. The B<GBStandard> names for these files can be computed via L<GB
Standard for Dita|http://metacpan.org/pod/Dita::GB::Standard>.
=head1 Author
L<philiprbrenan@gmail.com|mailto:philiprbrenan@gmail.com>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dita/GB/Standard.pm view on Meta::CPAN
# The Gearhart-Brenan Dita Topic Naming Standard
# Philip R Brenan at gmail dot com, Appa Apps Ltd Inc., 2019
#-------------------------------------------------------------------------------
# podDocumentation
# gbBinaryStandardFileName produces different results when given the file name versus the file content - it should be the same
package Dita::GB::Standard;
our $VERSION = 20201030;
require v5.16;
use warnings FATAL => qw(all);
use strict;
use Carp qw(confess);
lib/Dita/GB/Standard.pm view on Meta::CPAN
`head2 Implementation
The L<GBStandard> has been implemented as a L<Perl> package at:
L<http://metacpan.org/pod/Dita::GB::Standard>
`head2 Binary vs Utf8
Files that are expected to contain data encoded with L<utf8> (eg .dita, .xml)
should use method names that start with:
lib/Dita/GB/Standard.pm view on Meta::CPAN
=encoding utf-8
=head1 Name
Dita::GB::Standard - The Gearhart-Brenan Dita Topic Naming Standard.
=head1 Synopsis
The L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> is a means of naming L<Dita|http://docs.oasis-open.org/dita/dita/v1.3/os/part2-tech-content/dita-v1.3-os-part2-tech-content.html> topic files to enable global
collaboration through uncoordinated content sharing.
The L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> creates a human readable, deterministic file name which
depends solely on the content to be stored in that file. Such file names are
guaranteed to differ between files that contain differing content while being
identical for files that contain identical content by the use of an L<md5 sum|https://en.wikipedia.org/wiki/MD5> in
the file name.
The L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> name looks like this:
human_readable_part_derived_from_content + _ + md5_sum_of_content + extension
The human readable part from content is derived solely from the content of the
file by interpreting the file content as L<Unicode|https://en.wikipedia.org/wiki/Unicode> encoded as L<utf8|https://en.wikipedia.org/wiki/UTF-8>, then:
lib/Dita/GB/Standard.pm view on Meta::CPAN
- removing any leading or trailing underscores
- truncating the component if it extends beyond $nameFromStringMaximumLength characters.
The original file name for the content is not considered as part of the content
of the file and so plays no part in choosing the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> name for that
content.
If the file contains a B<title> tag then only the content of the B<title> tag
is processed as described above to obtain the human readable component of the
file name. If any of the following L<Dita|http://docs.oasis-open.org/dita/dita/v1.3/os/part2-tech-content/dita-v1.3-os-part2-tech-content.html> tags are found in a source file
lib/Dita/GB/Standard.pm view on Meta::CPAN
<concept>
<title>abc ð°ð±ð²</title>
<conbody/>
</concept>
then the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> name for the file is:
c_abc_8551cffdb92932637d952e04447783c8.dita
If the option to present the L<md5 sum|https://en.wikipedia.org/wiki/MD5> as five letter English words is chosen
then the standardized name for this content becomes:
c_abc_Plume_VApoR_CaPER_eqUAl_qUAIL_saInT_mEdia_Irony.dita
=head2 Benefits
The file names generated by the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> can be exploited in numerous ways
to simplify the creation, conversion, management and sharing of large
repositories of documents written to the L<Dita|http://docs.oasis-open.org/dita/dita/v1.3/os/part2-tech-content/dita-v1.3-os-part2-tech-content.html> standard:
=head3 Parallel Processing
Complex long running document transformations can be speeded up by running the
transformations in parallel.
The file name generated by the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> is unique when computed by
competing parallel processes so files that have the same name have the same
content and can be safely overwritten by another process without attempting to
coordinate names between processes. Likewise files that have different names
are guarenteed to have different content and so can be written out without
checking for an existing file of that name.
lib/Dita/GB/Standard.pm view on Meta::CPAN
check for matching content and names. Coordination between parallel processes
stops the processes from running fully in parallel. Conversely, eliminating the
need for coordination between parallel processes allows each process to run
more fully in parallel.
As a consequence, the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> enables parallel L<Dita|http://docs.oasis-open.org/dita/dita/v1.3/os/part2-tech-content/dita-v1.3-os-part2-tech-content.html> conversions to
scale effectively.
=head3 File Flattening
Files are automatically flattened by the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> as files with the same
content have the same name and so can safely share one global folder without
fear of name collisions or having multiple names for identical content.
=head3 Testing
The name of each file reflects only its content making it easier to write tests
for software build around the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>: it is no longer necessary to test
that the content of the file is as expected when it is sufficent just to test
the base name of the file.
One could, of course, compute the L<md5 sum|https://en.wikipedia.org/wiki/MD5> of the file easily during testing
but: the fact that one is computing such a sum at all shows just how useful
lib/Dita/GB/Standard.pm view on Meta::CPAN
=head3 Mixed Multiple Conversions
When converting documents to L<Dita|http://docs.oasis-open.org/dita/dita/v1.3/os/part2-tech-content/dita-v1.3-os-part2-tech-content.html> it is a standard practice to perform the
conversion in batches by source document type, perhaps B<html> files first, then
B<docbook> files, then L<word|https://en.wikipedia.org/wiki/Doc_(computing)> files. Thus leaves the problem of merging the
results into one corpus after each individual conversion. The L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>
resolves this problem by guaranteeing the uniqueness of the converted
files allowing them to be merged into one results folder without collisions.
=head3 No Relative Paths in References
lib/Dita/GB/Standard.pm view on Meta::CPAN
Extended path names that are repeated across many references are, in effect, a
form of boiler plate which can be avoided by applying this standard.
=head3 Relocating Dita References After Folder Restructuring
In the ideal implementation all files named with the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> occupy one
global folder. In circumstances where this is not possible, such files can
easily be moved into sub folders without fear of collisions, although, any Dita
references between such files might have to be updated. This update is easily
performed because only the path component has to be updated and the value of
the new path can easily be found by searching for the base component of the
lib/Dita/GB/Standard.pm view on Meta::CPAN
Imagine the user has several files in different folders all starting:
<title>License Agreement</title>
The L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> computes the human readable component of the name in a
consistent way using only the contents of each file. Once the name has been
standardized, all these files can be placed in B<one> folder to get a directory
listing like:
license_agreement_a6e3...
lib/Dita/GB/Standard.pm view on Meta::CPAN
license_agreement_c65d...
This grouping signals that these files are potentially similar to each other
and thus might be better merged into one shareable file.
As the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> is applied to ever more such files, ever more such matches
occur.
=head3 Copying And Moving Files For Global Interoperability
Users can copy files named using the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> around from folder to folder
without fear of collisions or duplication obviating the need for the time
consuming checks and reportage otherwise required before performing such
actions. The meta data in the L<Companion File> can also be copied in a similar
fearless manner.
If two users wish to share content: their files named using the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>
can be incorporated directly into the other user's file system without fear of
collisions or duplicating content thus promoting global content sharing and
collaboration of L<Dita|http://docs.oasis-open.org/dita/dita/v1.3/os/part2-tech-content/dita-v1.3-os-part2-tech-content.html> content.
=head3 Guidization For Content Management Systems
Self constructed Content Management Systems using BitBucket, GitHub or Gitlab
that rely on guidization to differentiate files placed in these repositories
benefit immensely: the L<guid|https://en.wikipedia.org/wiki/Universally_unique_identifier> to use can be easily derived from the L<md5 sum|https://en.wikipedia.org/wiki/MD5> sum
in the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> file name.
=head3 No need for authors to coordinate topic file names
The L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> is relevant to the administration of a production document
corpus. A production corpus being a corpus of documents that is B<evolving>
over time under the control of an administrator.
If an author is developing a document from scratch, in splendid isolation,
then, initially, the author might well wish to use topic file names of their
lib/Dita/GB/Standard.pm view on Meta::CPAN
At some point the system administrator will wish to incorporate the topic files
comprising the new document produced by the author into the production corpus.
The chance that any of the file names that the author has chosen will conflict
with the existing names in the production corpus as generated by the
L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> is negligible. It is thus safe for the administrator to copy the
author's topic files directly into the production corpus without renaming any
of them. Sooner or later, however, the administrator might wish to run an
automated scan of the entire production corpus to rename such recent additions
to the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>, to update all the references between these files that
would otherwise be invalidated by such changes and thereby to clear the
production corpus to make it ready to receive other new documents whose topic
file names, being chosen by humans, would otherwise very likely conflict with
existing topic file names already in the production corpus.
Thus clearing the production corpus by applying the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> obviates the
need for authors to coordinate the names of the files that they choose for
their topics with those choosen by other authors allowing each author to
proceed efficiently in isolated parallelism, spending more time writing and
less time in meetings with other authors discussing their latest file naming
strategy.
=head3 Using Dita Tags To Describe Content
The L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> encourages L<Dita|http://docs.oasis-open.org/dita/dita/v1.3/os/part2-tech-content/dita-v1.3-os-part2-tech-content.html> users to use meta data tags to describe
their documents so that content can be found by searching with L<grep|https://en.wikipedia.org/wiki/Grep> rather
than encoding file meta data in file names then searching for the required file
using L<find|https://en.wikipedia.org/wiki/Find_(Unix)>. Such file names quickly become very long and unmanageable: on
the one hand they need spaces in them to make them readable, but on the other
hand, the spaces make such files difficult to cut and paste or use from the
L<command line|https://en.wikipedia.org/wiki/Command-line_interface>.
=head3 Cut And Paste
As there are no spaces in the files names created using the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> such
file names can be selected by a mouse double click and thus easily copied and
pasted into other documents.
Conversely, one has to use cut and paste to manipulate such file names making
it impossible to mistype such file names in other documents.
=head3 CSV files
Files named using the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> can be safely included in B<.csv> files
because they have no spaces in them!
=head3 Automatic File Versioning
Files named to the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> File names change when their content changes.
So if the content of a file changes its name must change as well. Thus an
attempt to present an out-of-date version of a file produces a file name that
cannot be found.
=head3 Enhanced Command Line Processing
As file names named with the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> do not have spaces in them (such as
L<zero width space|https://en.wikipedia.org/wiki/Zero-width_space>) they work well on the L<command line|https://en.wikipedia.org/wiki/Command-line_interface> and with the many
L<command line|https://en.wikipedia.org/wiki/Command-line_interface> tools that are used to manipulate such files enhancing the
productivity leverage that L<command line|https://en.wikipedia.org/wiki/Command-line_interface> has always had versus L<graphical user interface|https://en.wikipedia.org/wiki/Graphical_user_interface>
processing.
=head3 Locating Files by Their Original Names Or Other Meta-Data
Each file produced by the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> can have a L<Companion File> of the same
name but without an extension. The L<Companion File> contains meta-data about the
file such as its original location etc. which can be searched by L<grep|https://en.wikipedia.org/wiki/Grep> or
similar.
To find such a file use L<grep|https://en.wikipedia.org/wiki/Grep> to find the L<Companion File> containing the
searched for content, paste that file name into the L<command line|https://en.wikipedia.org/wiki/Command-line_interface> after
entering any command such as B<ll> and then press B<.> followed by the L<tab|https://en.wikipedia.org/wiki/Tab_key>
key to have the L<shell|https://en.wikipedia.org/wiki/Shell_(computing)> expand it to locate the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> file that
corresponds to the located L<Companion File>. For example:
\\grep -r 'SR-dashboard-ds.png'
png_f940c7db293fe377e7d49c4e0c654cb2: source => "/home/phil/r/pureStorage/docBook/download/OE_User_Guide/SRRBeta/images/screenshots/dashboard/SR-dashboard-ds.png",
lib/Dita/GB/Standard.pm view on Meta::CPAN
a nework. Simply type the start of the B<G> part, the Human Readdable
Component, and press enter to see the possible candidates.
=head2 Companion File
Each file named using the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> may be accompanied by a
L<Companion File> that contains meta data describing the file, said data
formatted as a L<Perl|http://www.perl.org/> data structure.
The name of the L<Companion File> is obtained by removing the extension from the
file named using the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>.
As the content of the companion files is in plain text, such text is easy to
search using L<grep|https://en.wikipedia.org/wiki/Grep> or other textual search tools.
A common use of the companion file is to record the orginal file name and
lib/Dita/GB/Standard.pm view on Meta::CPAN
=head2 Alternate File Names
Most operating systems allow the use of links to supply alternate names for a
file. Consequently, users who wish to impose a different file naming scheme
might care to consider using links to implement their own file naming system on
top of the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> without disrupting the integrity of the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>.
For example: L<Xref|https://metacpan.org/pod/Data::Edit::Xml::Xref> produces B<Oxygen Project Files> which provide a virtual
hierarchical folder view of an otherwise flat folder.
=head2 Implementation
The L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> has been implemented as a L<Perl|http://www.perl.org/> package at:
L<http://metacpan.org/pod/Dita::GB::Standard>
=head2 Binary vs Utf8
Files that are expected to contain data encoded with L<utf8|https://en.wikipedia.org/wiki/UTF-8> (eg .dita, .xml)
should use method names that start with:
lib/Dita/GB/Standard.pm view on Meta::CPAN
=head1 Make and manage utf8 files
Make and manage files that conform to the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> and are coded in utf8.
=head2 gbStandardFileName($$%)
Return the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> file name given the content and extension of a proposed file.
Parameter Description
1 $content Content
2 $extension Extension
3 %options Various ingenious options designed by Micaela
lib/Dita/GB/Standard.pm view on Meta::CPAN
}
This method can be imported via:
use Dita::GB::Standard qw(gbStandardFileName)
=head2 gbStandardCompanionFileName($)
Return the name of the L<Companion File> given a file whose name complies with the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>.
Parameter Description
1 $file L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> file name
B<Example:>
ok ð´ð¯ð¦ðð®ð»ð±ð®ð¿ð±ðð¼ðºð½ð®ð»ð¶ð¼ð»ðð¶ð¹ð²ð¡ð®ðºð²(q(a/b.c)) eq q(a/b);
This method can be imported via:
use Dita::GB::Standard qw(gbStandardCompanionFileName)
=head2 gbStandardCompanionFileContent($)
Return the content of the L<Companion File> given a file whose name complies with the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>.
Parameter Description
1 $file L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> file name
B<Example:>
if (1) {
lib/Dita/GB/Standard.pm view on Meta::CPAN
}
This method can be imported via:
use Dita::GB::Standard qw(gbStandardCompanionFileContent)
=head2 gbStandardCreateFile($$$%)
Create a file in the specified B<$Folder> whose name is the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> name for the specified B<$content> and return the file name, A L<Companion File> can, optionally, be created with the specified B<...
Parameter Description
1 $Folder Target folder or a file in that folder
2 $content Content of the file
3 $extension File extension
lib/Dita/GB/Standard.pm view on Meta::CPAN
}
This method can be imported via:
use Dita::GB::Standard qw(gbStandardCreateFile)
=head2 gbStandardRename($%)
Check whether a file needs to be renamed to match the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>. Return the correct name for the file or B<undef> if the name is already correct.
Parameter Description
1 $file File to check
2 %options Options
lib/Dita/GB/Standard.pm view on Meta::CPAN
}
This method can be imported via:
use Dita::GB::Standard qw(gbStandardRename)
=head2 gbStandardCopyFile($%)
Copy a file to the specified B<$target> folder renaming it to the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>. If no B<$Target> folder is specified then rename the file in its current folder so that it does comply with the L<GB Standar...
Parameter Description
1 $source Source file
2 %options Options
lib/Dita/GB/Standard.pm view on Meta::CPAN
}
This method can be imported via:
use Dita::GB::Standard qw(gbStandardCopyFile)
=head2 gbStandardDelete($)
Delete a file and its companion file if there is one.
lib/Dita/GB/Standard.pm view on Meta::CPAN
}
This method can be imported via:
use Dita::GB::Standard qw(gbStandardDelete)
=head1 Make and manage binary files
Make and manage files that conform to the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> and are in plain binary.
=head2 gbBinaryStandardFileName($$)
Return the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> file name given the content and extension of a proposed file.
Parameter Description
1 $content Content
2 $extension Extension
lib/Dita/GB/Standard.pm view on Meta::CPAN
}
This method can be imported via:
use Dita::GB::Standard qw(gbBinaryStandardFileName)
=head2 gbBinaryStandardCompanionFileName($)
Return the name of the companion file given a file whose name complies with the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>.
Parameter Description
1 $file L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> file name
B<Example:>
ok ð´ð¯ðð¶ð»ð®ð¿ðð¦ðð®ð»ð±ð®ð¿ð±ðð¼ðºð½ð®ð»ð¶ð¼ð»ðð¶ð¹ð²ð¡ð®ðºð²(q(a/b.c)) eq q(a/b);
This method can be imported via:
use Dita::GB::Standard qw(gbBinaryStandardCompanionFileName)
=head2 gbBinaryStandardCompanionFileContent($)
Return the content of the L<Companion File> given a file whose name complies with the binary L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>.
Parameter Description
1 $file L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> file name
B<Example:>
if (1) {
lib/Dita/GB/Standard.pm view on Meta::CPAN
}
This method can be imported via:
use Dita::GB::Standard qw(gbBinaryStandardCompanionFileContent)
=head2 gbBinaryStandardCreateFile($$$$)
Create a file in the specified B<$Folder> whose name is the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> name for the specified B<$content> and return the file name, A L<Companion File> can, optionally, be created with the specified B<...
Parameter Description
1 $Folder Target folder or a file in that folder
2 $content Content of the file
3 $extension File extension
lib/Dita/GB/Standard.pm view on Meta::CPAN
}
This method can be imported via:
use Dita::GB::Standard qw(gbBinaryStandardCreateFile)
=head2 gbBinaryStandardRename($)
Check whether a file needs to be renamed to match the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>. Return the correct name for the file or B<undef> if the name is already correct.
Parameter Description
1 $file File to check
B<Example:>
lib/Dita/GB/Standard.pm view on Meta::CPAN
}
This method can be imported via:
use Dita::GB::Standard qw(gbBinaryStandardRename)
=head2 gbBinaryStandardCopyFile($$)
Copy a file to the specified B<$target> folder renaming it to the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>. If no B<$Target> folder is specified then rename the file in its current folder so that it does comply with the L<GB Standar...
Parameter Description
1 $source Source file
2 $target Target folder or a file in the target folder
lib/Dita/GB/Standard.pm view on Meta::CPAN
}
This method can be imported via:
use Dita::GB::Standard qw(gbBinaryStandardCopyFile)
=head2 gbBinaryStandardDelete($)
Delete a file and its L<Companion File> if there is one.
lib/Dita/GB/Standard.pm view on Meta::CPAN
}
This method can be imported via:
use Dita::GB::Standard qw(gbBinaryStandardDelete)
=head1 Index
1 L<gbBinaryStandardCompanionFileContent|/gbBinaryStandardCompanionFileContent> - Return the content of the L<Companion File> given a file whose name complies with the binary L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>.
2 L<gbBinaryStandardCompanionFileName|/gbBinaryStandardCompanionFileName> - Return the name of the companion file given a file whose name complies with the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>.
3 L<gbBinaryStandardCopyFile|/gbBinaryStandardCopyFile> - Copy a file to the specified B<$target> folder renaming it to the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>.
4 L<gbBinaryStandardCreateFile|/gbBinaryStandardCreateFile> - Create a file in the specified B<$Folder> whose name is the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> name for the specified B<$content> and return the file name, A L<Comp...
5 L<gbBinaryStandardDelete|/gbBinaryStandardDelete> - Delete a file and its L<Companion File> if there is one.
6 L<gbBinaryStandardFileName|/gbBinaryStandardFileName> - Return the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> file name given the content and extension of a proposed file.
7 L<gbBinaryStandardRename|/gbBinaryStandardRename> - Check whether a file needs to be renamed to match the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>.
8 L<gbStandardCompanionFileContent|/gbStandardCompanionFileContent> - Return the content of the L<Companion File> given a file whose name complies with the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>.
9 L<gbStandardCompanionFileName|/gbStandardCompanionFileName> - Return the name of the L<Companion File> given a file whose name complies with the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>.
10 L<gbStandardCopyFile|/gbStandardCopyFile> - Copy a file to the specified B<$target> folder renaming it to the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>.
11 L<gbStandardCreateFile|/gbStandardCreateFile> - Create a file in the specified B<$Folder> whose name is the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> name for the specified B<$content> and return the file name, A L<Companion File>...
12 L<gbStandardDelete|/gbStandardDelete> - Delete a file and its companion file if there is one.
13 L<gbStandardFileName|/gbStandardFileName> - Return the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard> file name given the content and extension of a proposed file.
14 L<gbStandardRename|/gbStandardRename> - Check whether a file needs to be renamed to match the L<GB Standard|http://metacpan.org/pod/Dita::GB::Standard>.
=head1 Exports
All of the following methods can be imported via:
use Dita::GB::Standard qw(:all);
Or individually via:
use Dita::GB::Standard qw(<method>);
1 L<gbBinaryStandardCompanionFileContent|/gbBinaryStandardCompanionFileContent>
lib/Dita/GB/Standard.pm view on Meta::CPAN
=head1 Installation
This module is written in 100% Pure Perl and, thus, it is easy to read,
comprehend, use, modify and install via B<cpan>:
sudo cpan install Dita::GB::Standard
=head1 Author
L<philiprbrenan@gmail.com|mailto:philiprbrenan@gmail.com>
lib/Dita/GB/Standard.pm view on Meta::CPAN
if ($^O !~ m(bsd|linux)i)
{plan skip_all => 'Not supported';
}
Test::More->builder->output("/dev/null") # Show only errors during testing
if ((caller(1))[0]//'Dita::GB::Standard') eq "Dita::GB::Standard";
is_deeply [hex4ToBits(q(0001))], [0,0,0,0,0,1];
is_deeply [hex4ToBits(q(c001))], [1,1,0,0,0,1];
is_deeply [hex4ToBits(q(c002))], [1,1,0,0,0,2];
is_deeply [hex4ToBits(q(d010))], [1,1,0,1,0,16];
view all matches for this distribution