public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Trace
data/web/inc/lib/vendor/soundasleep/html2text/convert.php
Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.
Author
Date
Commit
Line
Code
1
<?php
3
/******************************************************************************
4
* Copyright (c) 2010 Jevon Wright and others.
5
* All rights reserved. This program and the accompanying materials
6
* are made available under the terms of the Eclipse Public License v1.0
7
* which accompanies this distribution, and is available at
8
* http://www.eclipse.org/legal/epl-v10.html
9
*
10
* or
11
*
12
* LGPL which is available at http://www.gnu.org/licenses/lgpl.html
13
*
14
*
15
* Contributors:
16
* Jevon Wright - initial API and implementation
17
****************************************************************************/
19
/**
20
* This file allows you to convert through the command line.
21
* Usage:
22
* php -f convert.php [input file]
23
*/
25
if (count($argv) < 2) {
26
throw new \InvalidArgumentException("Expected: php -f convert.php [input file]");
27
}
29
if (!file_exists($argv[1])) {
30
throw new \InvalidArgumentException("'" . $argv[1] . "' does not exist");
31
}
33
$input = file_get_contents($argv[1]);
35
require_once(__DIR__ . "/src/Html2Text.php");
36
require_once(__DIR__ . "/src/Html2TextException.php");
38
echo Html2Text\Html2Text::convert($input);